@font-face {
  font-family: 'Aclonica';
  src: url('fonts/aclonica-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* ── DESIGN TOKENS ── */
:root {
  --color-bg:    #ffffff;
  --color-navy:  #042956;   /* Aclonica text + dot icons ONLY */
  --color-text:  #000000;   /* all other text */
  --font-display: 'Aclonica', sans-serif;   /* MAIT wordmark only */
  --font-sans:    'Helvetica Neue', Helvetica, Arial, sans-serif; /* everything else */
  --nav-height:   56px;
  --ease-main:    cubic-bezier(0.44, 0, 0.56, 1);
  --ease-drop:    cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: transparent;
  opacity: 0;
  animation: fadeSlideDown 0.6s var(--ease-drop) 0.1s forwards;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-navy);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
  position: relative;
  display: inline-flex;
  align-items: center;        /* keep letters on same horizontal line */
}

/* underline: 2px below the text */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--color-navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-drop);
}
.nav-links a:hover { color: var(--color-navy); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ── letter roll ── */
.nl-wrap {
  display: inline-block;
  overflow: hidden;
  line-height: 1.2;
  vertical-align: middle;     /* align with nav-brand baseline */
}

/* top letter (original) slides up on hover */
.nl-top {
  display: block;
  transition: transform 0.4s var(--ease-drop);
  transition-delay: var(--d, 0ms);
}

/* bottom letter (clone) starts below, rolls up on hover */
.nl-bot {
  display: block;
  transform: translateY(0);
  transition: transform 0.4s var(--ease-drop);
  transition-delay: var(--d, 0ms);
  color: var(--color-navy);
}

/* before hover: bot sits just below top */
.nl-bot { transform: translateY(100%); }

.nav-links a:hover .nl-top { transform: translateY(-100%); }
.nav-links a:hover .nl-bot  { transform: translateY(-100%); }

/* ── HERO ── */
.hero {
  position: relative;
  height: 100vh;
  padding-top: var(--nav-height);
  padding-bottom: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.hero-mait-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Same organic paths as the Next.js hero, tinted for the white canvas. */
.hero-lineart {
  position: absolute;
  top: 12%;
  right: -4%;
  width: min(82vw, 1159px);
  height: auto;
  opacity: 0.13;
  pointer-events: none;
  user-select: none;
}
.hero-mait-wrapper { position: relative; z-index: 1; }
.nl-wrap { height: 1.2em; }
a:focus-visible, button:focus-visible {
  outline: 2px solid #6b7fd7;
  outline-offset: 5px;
}

/* UX / UI Designer tag */
.hero-tag {
  align-self: flex-end;
  padding-right: 40px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-drop) 0.5s forwards;
}

.hero-tag__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-navy); /* icon — stays navy */
  flex-shrink: 0;
}

.hero-tag__label {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
}

/* MAIT wordmark — Aclonica + navy, the only exception */
.hero-mait {
  width: 100%;
  padding: 0 24px;
  line-height: 1;
  font-family: var(--font-display);
  font-size: 480px;
  color: var(--color-navy);
  white-space: nowrap;
  display: flex;
  overflow: hidden;
}

.mait-ma {
  display: inline-block;
  opacity: 0;
  transform: translateX(-60px);
  animation: slideInLeft 1.7s var(--ease-main) 0.2s forwards;
}

.mait-it {
  display: inline-block;
  opacity: 0;
  transform: translateX(60px);
  animation: slideInRight 1.7s var(--ease-main) 0.4s forwards;
}

/* Bottom bar */
.hero-bottom {
  width: 100%;
  padding: 0 24px;
  margin-top: -40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-drop) 1.0s forwards;
}

.hero-clock,
.hero-location {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* ── KEYFRAMES ── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* spacer sits after the sticky projects section in normal flow.
   Its height = how far you scroll through the animation before About appears. */
.projects-spacer {
  height: 280vh;
  background: #fff;
}

/* ── PROJECTS SECTION ── */
.projects {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 100vh;
  background: #fff;
  overflow: hidden;
}

/* full-size scene fills the sticky viewport */
.projects-scene {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ── "MAKE IT REAL" ── */
.projects-headline {
  position: absolute;
  z-index: 1;
  text-align: center;
  pointer-events: none;
  /* opacity + transform driven by scroll JS */
  opacity: 0;
  transform: translateY(16px);
  will-change: opacity, transform;
}

.projects-title {
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
}

/* ── CARD STACK (all cards share same absolute position) ── */
.projects-stack {
  /* Leave room for the rotated corners and navigation on short screens. */
  --project-card-width: min(36vw, 520px, calc((100svh - 240px) * 0.9508));
  position: relative;
  z-index: 2;
  width: var(--project-card-width);
  height: calc(var(--project-card-width) * 305 / 290);
}

.project-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  z-index: var(--zi);
  will-change: transform, opacity;
}

/* Only when fully spread — CSS takes over for smooth hover */
.project-card.is-fully-spread {
  transition: transform 0.45s var(--ease-drop);
}

.project-card.is-fully-spread:hover {
  transform: translateX(var(--final-sx)) translateY(-12px) rotate(0deg) scale(calc(var(--final-scale, 1) * 1.03)) !important;
  z-index: 10;
}

.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.project-card__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.project-card__name {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.project-card__num {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

/* ── ABOUT SECTION (slides over projects via z-index, not sticky) ── */
.about {
  position: relative;
  z-index: 2;
  background: #ebebeb;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.10);
  padding: 56px 40px 80px;
  min-height: 100vh;
}

.about-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
}

.section-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-navy); /* icon — stays navy */
  flex-shrink: 0;
}

.btn-cv {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text);
  border: 1.5px solid var(--color-text);
  border-radius: 100px;
  padding: 10px 24px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-cv:hover {
  background: var(--color-text);
  color: #fff;
}

.about-bio {
  max-width: 400px;
  margin-bottom: 64px;
}
.about-bio p {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
}

.about-statement {
  margin-bottom: 80px;
}
.about-statement p {
  font-family: var(--font-sans);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
  max-width: 900px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.process-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.process-num {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #888;
}

.process-title {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

.process-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  margin-top: auto;
}

/* ── FOOTER ── */
.footer {
  position: relative;
  z-index: 3;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.08);
  min-height: 100vh;
  padding: 56px 40px 48px;
  display: flex;
  flex-direction: column;
}

.footer-top {
  margin-top: auto;  /* pushes label + headline + links to the bottom */
  margin-bottom: 8px;
}

.footer-headline {
  font-family: var(--font-display);
  font-size: clamp(80px, 12vw, 180px);
  line-height: 1;
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid #e0e0e0;
  padding-top: 24px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-left a,
.footer-left span {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
}
.footer-left a:hover { opacity: 0.5; }

.footer-right {
  display: flex;
  gap: 32px;
}

.footer-right a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  transition: opacity 0.2s;
}
.footer-right a:hover { opacity: 0.4; }

/* A straight reading flow keeps every project reachable on touch screens. */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .projects { position: relative; height: auto; overflow: visible; padding: 56px 20px 64px; }
  .projects-scene { display: block; height: auto; }
  .projects-headline { position: static; opacity: 1; transform: none; text-align: left; margin-bottom: 28px; }
  .projects-title { font-size: clamp(32px, 7vw, 48px); }
  .projects-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; height: auto; }
  .project-card { position: relative; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 290 / 305; opacity: 1; transform: none; will-change: auto; }
  .project-card.is-fully-spread:hover { transform: none !important; }
  .project-card__name { font-size: 16px; }
  .projects-spacer { display: none; }
}

@media (max-width: 768px) {
  :root { --nav-height: 96px; }
  html { scroll-padding-top: calc(var(--nav-height) + 16px); }
  .nav {
    top: 0;
    height: var(--nav-height);
    padding: 12px 20px 4px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(4,41,86,0.08);
  }
  .nav-brand { font-size: 14px; white-space: nowrap; padding-top: 4px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 12px; }
  .nav-links a { font-size: 12px; min-height: 44px; }
  .nav-links a::after { bottom: 6px; }
  .hero { height: 76svh; min-height: 440px; padding-bottom: 28px; }
  .hero-lineart { top: 28%; right: -20%; width: 120%; opacity: 0.13; }
  .hero-mait { padding: 0 20px; font-size: clamp(88px, 33vw, 248px); overflow: visible; }
  .hero-tag { padding-right: 20px; margin-bottom: 12px; }
  .hero-tag__label { font-size: 13px; }
  .hero-bottom { padding: 0 20px; margin-top: 16px; gap: 8px; flex-direction: column; }
  .hero-clock, .hero-location { font-size: 12px; line-height: 1.5; }
  .projects-stack { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .project-card { aspect-ratio: 4 / 5; }
  .about { padding: 40px 20px 48px; min-height: auto; border-radius: 16px 16px 0 0; }
  .about-topbar { margin-bottom: 28px; }
  .about-bio { margin-bottom: 32px; max-width: 100%; }
  .about-bio p { font-size: 16px; }
  .about-statement { margin-bottom: 32px; }
  .about-statement p { font-size: clamp(28px, 6vw, 40px); line-height: 1.2; }
  .process-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .process-card { min-height: auto; padding: 24px; }
  .process-desc { font-size: 14px; }
  .btn-cv { min-height: 44px; display: inline-flex; align-items: center; }
  .footer { padding: 48px 20px 28px; border-radius: 16px 16px 0 0; min-height: auto; }
  .footer-top { margin-top: 0; margin-bottom: 20px; }
  .footer-headline { font-size: clamp(48px, 14vw, 104px); margin-bottom: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-left { max-width: 100%; gap: 8px; overflow-wrap: anywhere; }
  .footer-right { flex-wrap: wrap; gap: 24px; }
  .footer-right a { display: inline-flex; min-height: 44px; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; }
}

/* Portfolio introduction and selected case. */
.eyebrow { font-size: 12px; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; color: #515d7a; }
.hero { height: auto; min-height: 100svh; padding-top: calc(var(--nav-height) + 64px); gap: 48px; }
.hero-intro { position: relative; z-index: 1; max-width: 680px; padding: 0 40px; }
.hero-intro h1 { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.12; font-weight: 500; letter-spacing: -.035em; color: var(--color-navy); margin: 16px 0; }
.hero-intro__text { max-width: 540px; font-size: 16px; line-height: 1.65; color: #515d7a; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.button-primary { display: inline-flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 48px; padding: 14px 20px; background: var(--color-navy); color: #fff; border-radius: 100px; font-size: 14px; line-height: 1.4; }
.button-primary:hover { background: #0b4080; }
.text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; text-decoration: underline; text-underline-offset: 5px; }
.hero-mait { font-size: min(33vw, 480px); }
.hero-lineart { top: auto; bottom: 120px; }
.project-card__overlay { display: block; padding: 64px 24px 24px; background: linear-gradient(to top, rgba(3, 20, 40, .97), rgba(3, 20, 40, .82) 65%, transparent); }
.project-card__name { display: block; font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; line-height: 1.15; }
.project-card__description { color: #fff; font-size: 16px; line-height: 1.4; margin: 8px 0; max-width: 32ch; }
.project-card__type { display: block; color: #fff; font-size: 14px; line-height: 1.4; }
.project-card__cta { display: inline-flex; align-items: center; gap: 16px; min-height: 40px; margin-top: 16px; padding: 10px 14px; border-radius: 100px; background: white; color: var(--color-navy); font-size: 16px; font-weight: 600; line-height: 1.2; }
.project-card__num { display: none; }
.projects-scroll-hint { position: absolute; z-index: 3; left: 40px; right: 40px; bottom: 24px; display: flex; align-items: center; gap: 16px; color: var(--color-navy); font-size: 13px; pointer-events: none; }
.projects-progress { width: clamp(80px, 12vw, 180px); height: 3px; overflow: hidden; background: #dce2ec; border-radius: 2px; }
.projects-progress__fill { display: block; height: 100%; background: var(--color-navy); transform: scaleX(var(--projects-progress, 0)); transform-origin: left; }
.projects-scroll-hint__arrow { margin-left: auto; font-size: 20px; }
.projects-lineart { position: absolute; z-index: 0; width: min(60vw, 820px); height: auto; pointer-events: none; user-select: none; opacity: calc(.035 + var(--projects-sides-opacity, 0) * .035); }
.projects-lineart--left { left: -24vw; top: 10%; transform: rotate(22deg); }
.projects-lineart--right { right: -24vw; bottom: 8%; transform: rotate(202deg); }
.projects-aside { position: absolute; z-index: 1; top: 50%; width: clamp(138px, 18vw, 280px); transform: translateY(-50%); opacity: var(--projects-sides-opacity, 0); transition: opacity .25s ease; color: var(--color-navy); pointer-events: none; }
.projects-aside--left { left: clamp(24px, 4vw, 80px); }
.projects-aside--right { right: clamp(24px, 4vw, 80px); }
.projects-aside__label { margin-bottom: 20px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #515d7a; }
.projects-aside__count { display: flex; align-items: baseline; gap: 12px; }
.projects-aside__number { font-size: clamp(72px, 9vw, 144px); font-weight: 500; line-height: 1; letter-spacing: -.07em; color: rgba(4, 41, 86, .17); }
.projects-aside__total { font-size: 14px; color: #515d7a; }
.projects-aside__caption { margin-top: 20px; font-size: 14px; line-height: 1.6; color: #515d7a; }
.projects-aside__name { margin-bottom: 12px; font-size: clamp(20px, 2.1vw, 30px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; }
.projects-aside__type { font-size: 14px; line-height: 1.6; color: #515d7a; }
.projects-aside__year { width: fit-content; min-width: 64px; margin-top: 20px; padding-top: 12px; border-top: 1px solid #c5cede; font-size: 13px; color: #515d7a; }
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .projects-scroll-hint { display: none; }
  .projects-aside, .projects-lineart { display: none; }
}
.work-in-progress { position: relative; z-index: 2; background: white; display: flex; gap: 24px; align-items: baseline; justify-content: space-between; padding: 28px 40px; border-top: 1px solid #e0e0e0; }
.work-in-progress a { display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; min-height: 44px; font-size: 18px; }
.work-in-progress a span { color: #515d7a; font-size: 13px; }
.projects-spacer { height: 280vh; }
@media (max-width: 768px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-height) + 28px); gap: 40px; }
  .hero-intro { padding: 0 20px; }
  .hero-intro h1 { font-size: clamp(30px, 6vw, 44px); }
  .hero-intro .eyebrow { font-size: 10px; }
  .hero-intro__text { font-size: 15px; }
  .hero-actions { gap: 16px; }
  .hero-lineart { top: auto; bottom: 88px; }
  .work-in-progress { padding: 24px 20px; flex-direction: column; gap: 12px; }
  .work-in-progress a { flex-direction: column; gap: 6px; }
}
html { scroll-padding-top: calc(var(--nav-height) + 24px); }
