/* Utils */
:root {
  --bg: #080808;
  --surface: #121212;
  --text-main: #e1e1e1;
  --text-muted: #888888;
  --accent: #3b82f6;
  --border: rgba(255, 255, 255, 0.08);
  --font-heading: "Syne", sans-serif;
  --font-body: "Inter", sans-serif;
  --nav-mix-blend: difference;

  /* Cursor Logic */
  --cursor-blend: difference;
  --cursor-bg: #fff;

  /* Layout vars from Reference */
  --gutter: clamp(24px, 5vw, 80px);
  --section-spacing: clamp(100px, 15vh, 180px);
  --display-huge: clamp(3.5rem, 9vw, 7rem);
}
[data-theme="light"] {
  --bg: #e6e4e0;
  --surface: #dcdad6;
  --text-main: #1a1a1a;
  --text-muted: #555555;
  --accent: #2563eb;
  --border: rgba(0, 0, 0, 0.1);
  --nav-mix-blend: normal;
  --cursor-blend: difference;
  --cursor-bg: #fff;
}

/* Universal CSS */
* {
  margin: 0%;
  padding: 0%;
  box-sizing: border-box;
  cursor: none;
  text-decoration: none;
  color: inherit;
}
html {
  scroll-behavior: auto;
}
/* Selection CSS */
::selection {
  background: var(--accent);
  color: var(--bg) !important;
}

/* image reset */
img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (hover: none) {
  * {
    cursor: auto !important;
  }
}

/* Grain Texture */
.noise-overlay {
  position: fixed;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background: var(--cursor-bg);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: var(--cursor-blend);
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
}
.cursor.hovered {
  transform: translate(-50%, -50%) scale(3);
}

/* Global Utils */

.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.btn-link {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 5px;
  transition: all 0.3s ease;
}
.btn-link:hover {
  padding-bottom: 8px;
  color: var(--accent);
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Nav Section */

nav {
  padding: 2.5rem 0;
  position: fixed;
  width: 100%;
  z-index: 100;
  background: var(--bg);
  color: white;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
[data-theme="light"] nav {
  color: var(--text-main);
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -1px;
  z-index: 101;
  position: relative;
}
.nav-actions {
  display: flex;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 4rem;
  align-items: center;
}
.nav-link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 5rem;
  padding: 0.5rem;
  z-index: 101;
  position: relative;
}
.theme-toggle i {
  font-size: 1.25rem;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  width: 30px;
  height: 30px;
  margin-left: 1.5rem;
  z-index: 101;
  position: relative;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 4rem 2rem;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.mobile-navlinks {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 3rem 0rem;
}
.mobile-menu.open {
  transform: translateY(0);
}
.mobile-link {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--text-main);
  opacity: 0;
  transform: translateY(20px);
}
.mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive CSS */
@media (max-width: 992px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .theme-toggle {
    margin-left: 0;
  }
  .nav-actions {
    gap: 1.5rem;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .container {
    width: 90%;
  }
  .work-section,
  .about-section,
  .journal-section,
  .expertise-section {
    padding: 5rem 0;
  }

  .footer {
    padding-top: 5rem;
  }

  .project-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem 0;
  }

  .project-item:hover {
    padding: 2rem 1rem;
  }

  .p-cats {
    display: none;
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-bottom {
    flex-direction: column-reverse;
    gap: 2rem;
    align-items: flex-start;
  }

  .ist-time {
    text-align: left;
  }
  .cursor {
    display: none;
  }
  * {
    cursor: auto;
  }
  .mobile-menu {
    justify-content: flex-start;
    padding-top: 6rem;
  }
}

body {
  /* opacity: 0; */
}
nav {
  padding: 2rem var(--gutter) !important;
}
/* --- LAYOUT UTILS --- */
.container {
  width: 100%;
  padding: 0 var(--gutter);
  margin: 0 auto;
  max-width: 1600px;
}

.section-pad {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
}

.overflow-hidden {
  overflow: hidden;
}

.reveal-text {
  display: block;
  transform: translateY(120%);
}

/* --- TYPOGRAPHY --- */
.display-text {
  font-family: var(--font-heading);
  font-size: var(--display-huge);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
}

.projects-hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10rem;
  width: 100%;
}
.hero-desc {
  margin-top: 3rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.6;
}
#projectCount {
  display: inline;
}
.scroll-down {
  position: absolute;
  bottom: 2rem;
  right: 5%;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-line {
  width: 50px;
  height: 1px;
  background: var(--text-muted);
}

/* Project Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  margin-top: 8rem;
  margin-bottom: 4rem;
}
@media (min-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 6rem;
    row-gap: 10rem;
  }
  .projects-item:nth-child(even) {
    margin-top: 10rem;
    background: hotpink;
  }
}

.projects-item {
  display: block;
  group: "";
  position: relative;
}
.p-img-container {
  aspect-ratio: 16/9;
  object-fit: contain;
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
}

.p-img-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.85;
  transform: scale(1);
  filter: saturate(60%);
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
}

.project-item:hover .p-img-container img {
  filter: saturate(100%);
  transform: scale(1.1);
  opacity: 1;
}

.project-item:hover .p-title {
  color: var(--accent);
}

.p-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.p-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
  line-height: 1;
}

.p-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 450px;
  line-height: 1.5;
}

.p-year {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  opacity: 0.6;
}

.p-tags {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  transition: 0.3s;
}

.project-item:hover .tag {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- FOOTER --- */
.footer {
  min-height: 100vh;
  padding: 8rem 3rem 2rem 3rem; 
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.75fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: auto;
  padding-top: 4rem;
}

.footer-cta {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 8vw, 9rem);
  line-height: 0.9;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s;
  margin-bottom: 2rem;
  margin-top: 3rem;
  display: block;
  word-break: break-word;
}

.footer-cta:hover {
  color: var(--accent);
}
.footer-links-col {
  display: flex;
  flex-direction: column;
}


.footer-links-col h4 {
  color: var(--text-muted);
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.footer-links-col a {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  transition: color 0.2s;
}

.footer-links-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.ist-time {
  text-align: right;
}

.ist-time span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.ist-time div {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

/* Responsive */
@media (max-width: 992px) {
  html {
    font-size: 75%;
  }
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .p-img-container {
    aspect-ratio: 16/10;
  }

  .cursor,
  .cursor-outline {
    display: none;
  }

  * {
    cursor: auto;
  }
}
