/* ===========================================================
   Arthur Renard — personal site
   Sage-green liquid-glass design system
   =========================================================== */

:root {
  /* Sage ramp (from brief) */
  --green-deepest: #3e4a39;   /* deepest — gradient floor */
  --green-base:    #4b5945;   /* primary page background */
  --green-mid:     #66785f;   /* panels, secondary surfaces */
  --sage:          #91ac8f;   /* accents, borders, hover */
  --sage-light:    #b2c9ad;   /* highlights, frosted tints */
  --ink-on-light:  #2c3727;   /* dark text on light sage panels */

  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.72);
  --white-faint: rgba(255, 255, 255, 0.5);

  /* Glass */
  --glass-tint:    rgba(178, 201, 173, 0.10);
  --glass-tint-2:  rgba(178, 201, 173, 0.16);
  --glass-border:  rgba(255, 255, 255, 0.22);
  --glass-edge:    rgba(255, 255, 255, 0.45);

  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;

  --shadow-soft: 0 24px 60px -20px rgba(20, 28, 18, 0.55);
  --shadow-deep: 0 40px 90px -30px rgba(15, 22, 13, 0.7);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  background: var(--green-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---- Ambient background: depth + drifting glass blobs ---- */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(178, 201, 173, 0.22), transparent 60%),
    radial-gradient(900px 800px at 8% 18%, rgba(102, 120, 95, 0.45), transparent 62%),
    radial-gradient(1200px 900px at 50% 118%, rgba(46, 56, 41, 0.85), transparent 55%),
    linear-gradient(160deg, #54634d 0%, var(--green-base) 42%, var(--green-deepest) 100%);
}
.bg-field::before,
.bg-field::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}
.bg-field::before {
  width: 46vw; height: 46vw;
  top: 6%; right: -8%;
  background: radial-gradient(circle, rgba(178, 201, 173, 0.6), transparent 65%);
  transform: translateY(var(--blob1, 0));
}
.bg-field::after {
  width: 40vw; height: 40vw;
  bottom: 2%; left: -10%;
  background: radial-gradient(circle, rgba(145, 172, 143, 0.5), transparent 68%);
  transform: translateY(var(--blob2, 0));
}
/* faint grain */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Scroll progress bar ---- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--sage), var(--sage-light));
  z-index: 200;
  box-shadow: 0 0 12px rgba(178, 201, 173, 0.6);
}

/* ===========================================================
   Navigation
   =========================================================== */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: var(--maxw);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 12px 22px;
  border-radius: 100px;
  background: rgba(60, 72, 55, 0.42);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 var(--glass-edge);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), top 0.4s var(--ease);
}
.nav.shrink {
  top: 10px;
  padding-top: 9px;
  padding-bottom: 9px;
  background: rgba(52, 63, 48, 0.6);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

/* Left cluster: language switcher + brand */
.nav-left { display: flex; align-items: center; gap: 12px; }

.lang-switch { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 100px;
  cursor: pointer;
  color: var(--white-soft);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.04em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); }
.lang-globe { width: 16px; height: 16px; display: block; opacity: 0.9; }
.lang-code { line-height: 1; }
.lang-caret { width: 9px; height: 9px; opacity: 0.7; transition: transform 0.3s var(--ease); }
.lang-switch.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 168px;
  border-radius: 16px;
  background: rgba(52, 63, 48, 0.82);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow-deep), inset 0 1px 0 var(--glass-edge);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
  z-index: 120;
}
.lang-switch.open .lang-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lang-menu li { margin: 0; }
.lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--white-soft);
  font: inherit;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-menu button:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.lang-menu button.active {
  color: var(--ink-on-light);
  background: linear-gradient(145deg, var(--sage-light), var(--sage));
}
.lang-menu button.active::after { content: "✓"; font-size: 12px; }
.brand .monogram {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--ink-on-light);
  background: linear-gradient(145deg, var(--sage-light), var(--sage));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 6px 16px -6px rgba(0,0,0,0.5);
}
.brand .brand-name {
  font-size: 15.5px;
  font-weight: 550;
  letter-spacing: 0.2px;
  white-space: nowrap;
  line-height: 1.1;
}
.brand .brand-name span { color: var(--white-faint); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--white-soft);
  font-size: 14.5px;
  font-weight: 450;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: 100px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-links a.active {
  color: var(--ink-on-light);
  background: linear-gradient(145deg, var(--sage-light), var(--sage));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.nav-toggle { display: none; }

/* ===========================================================
   Layout primitives
   =========================================================== */
main { position: relative; z-index: 1; }

.wrap { width: calc(100% - 40px); max-width: var(--maxw); margin: 0 auto; }

section { position: relative; }

.section-pad { padding: clamp(80px, 12vh, 150px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-light);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--sage);
}

h1, h2, h3 { font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 88px); font-weight: 600; }
h2 { font-size: clamp(32px, 4.6vw, 56px); }
h3 { font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -0.01em; }

.lead { font-size: clamp(18px, 2.1vw, 22px); color: var(--white-soft); font-weight: 400; line-height: 1.55; }
p { text-wrap: pretty; }

/* ===========================================================
   Glass surfaces
   =========================================================== */
.glass {
  position: relative;
  background: linear-gradient(155deg, var(--glass-tint-2), var(--glass-tint));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 var(--glass-edge), inset 0 -1px 1px rgba(0,0,0,0.12);
}
.glass::after {
  /* specular edge highlight */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255,255,255,0.55), rgba(255,255,255,0) 40%, rgba(255,255,255,0) 70%, rgba(255,255,255,0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* light sage glass panel (dark text) */
.glass-light {
  background: linear-gradient(155deg, rgba(178,201,173,0.92), rgba(145,172,143,0.82));
  color: var(--ink-on-light);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255,255,255,0.7);
}

/* ===========================================================
   Buttons
   =========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 550;
  white-space: nowrap;
  padding: 14px 26px;
  border-radius: 100px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
  will-change: transform;
}
.btn .arr { transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary {
  color: var(--ink-on-light);
  background: linear-gradient(145deg, var(--sage-light), var(--sage));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 14px 34px -14px rgba(0,0,0,0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 22px 44px -16px rgba(0,0,0,0.75); }
.btn-ghost {
  color: var(--white);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }

/* ===========================================================
   Lateral-drift reveal (signature motion)
   =========================================================== */
.reveal {
  opacity: 0;
  transform: translateX(var(--drift, 64px)) translateY(14px);
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out);
  will-change: transform, opacity;
}
.reveal.in {
  opacity: 1;
  transform: translateX(0) translateY(0);
}
.reveal[data-drift="left"]  { --drift: -64px; }
.reveal[data-drift="right"] { --drift: 64px; }
.reveal[data-drift="up"]    { --drift: 0px; transform: translateY(36px); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .bg-field::before, .bg-field::after { transform: none !important; }
}

/* Static fallback: when the runtime can't advance animations, show the
   visible end-state of every reveal instantly (never blank). */
.no-anim .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.no-anim .scroll-bead { animation: none !important; left: 16px !important; }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: 40px 0 48px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer .f-links { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--white-soft); text-decoration: none; font-size: 14.5px; transition: color 0.3s; }
.site-footer a:hover { color: var(--white); }
.site-footer .copy { color: var(--white-faint); font-size: 13.5px; }

/* ===========================================================
   Page: HOME
   =========================================================== */
.hero { padding-top: clamp(150px, 22vh, 230px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
}
.hero-copy { min-width: 0; }
.hero-copy h1 { margin: 14px 0 22px; }
.hero-line { max-width: 30ch; }
.hero-line .dot { color: var(--sage-light); padding: 0 2px; }
.hero-cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }

.hero-portrait { position: relative; justify-self: center; width: 100%; max-width: 440px; }
.portrait-slot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255,255,255,0.25);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.portrait-glow {
  position: absolute;
  inset: -10% -4% -6% -4%;
  border-radius: 40px;
  background: radial-gradient(closest-side, rgba(178,201,173,0.5), transparent 78%);
  filter: blur(28px);
  z-index: -1;
}
.portrait-badge {
  position: absolute;
  left: 18px; bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 100px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage-light);
  box-shadow: 0 0 10px var(--sage-light);
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: clamp(50px, 8vh, 90px) auto 0;
  width: calc(100% - 40px);
  max-width: var(--maxw);
  color: var(--white-faint);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.scroll-rail {
  position: relative;
  width: 46px; height: 1px;
  background: rgba(255,255,255,0.25);
  overflow: hidden;
}
.scroll-bead {
  position: absolute; top: -1.5px; left: 0;
  width: 14px; height: 4px; border-radius: 4px;
  background: var(--sage-light);
  animation: bead 2.4s var(--ease) infinite;
}
@keyframes bead { 0% { left: -14px; } 60%,100% { left: 46px; } }

/* Section heads */
.sec-head { max-width: 720px; margin-bottom: clamp(40px, 6vh, 64px); }
.sec-head h2 { margin-top: 16px; }
.muted { color: var(--white-faint); }

/* Pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pillar {
  padding: 34px 30px 30px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-deep), inset 0 1px 0 var(--glass-edge); }
.pillar-tag {
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--sage-light);
  margin-bottom: auto;
}
.pillar h3 { margin: 28px 0 12px; }
.pillar p { color: var(--white-soft); font-size: 15.5px; margin: 0; line-height: 1.55; }

/* Intro panel */
.intro-panel { padding: clamp(40px, 6vw, 70px); }
.eyebrow-dark { color: var(--ink-on-light); }
.eyebrow-dark::before { background: var(--ink-on-light); opacity: 0.5; }
.intro-text {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 20px 0 30px;
  max-width: 24ch;
  color: var(--ink-on-light);
}
.intro-links { display: flex; gap: 28px; flex-wrap: wrap; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 550; font-size: 15.5px;
  color: var(--ink-on-light);
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(44,55,39,0.3);
  transition: border-color 0.3s, gap 0.3s;
}
.link-arrow .arr { transition: transform 0.3s var(--ease); }
.link-arrow:hover { border-color: var(--ink-on-light); }
.link-arrow:hover .arr { transform: translateX(4px); }

@media (max-width: 860px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { grid-row: 1; max-width: 360px; margin-bottom: 10px; }
}

/* ===========================================================
   Shared: page head, CTA band
   =========================================================== */
.page-head { padding-top: clamp(150px, 20vh, 220px); padding-bottom: clamp(40px, 6vh, 70px); }
.page-head h1 { margin: 18px 0 26px; max-width: 14ch; }
.page-lead { max-width: 52ch; }

.btn-dark {
  color: var(--white);
  background: var(--green-deepest);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 14px 30px -14px rgba(0,0,0,0.6);
}
.btn-dark:hover { transform: translateY(-2px); background: #36402f; }

.cta-band { padding-top: clamp(40px, 6vh, 70px); }
.cta-panel { padding: clamp(44px, 6vw, 72px); text-align: center; }
.cta-h { color: var(--ink-on-light); }
.cta-sub { color: rgba(44,55,39,0.78); font-size: clamp(16px, 2vw, 19px); margin: 14px 0 30px; }
.cta-actions { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ===========================================================
   Page: ABOUT
   =========================================================== */
.narrative-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
.narrative-aside { position: sticky; top: 110px; }
.aside-card { padding: 28px 26px; }
.aside-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.aside-row:last-child { border-bottom: none; }
.aside-row .k { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage-light); }
.aside-row .v { font-size: 16px; color: var(--white); font-weight: 500; }

.narrative-body p { color: var(--white-soft); font-size: 17.5px; line-height: 1.65; margin: 0 0 22px; }
.narrative-body em { color: var(--white); font-style: normal; font-weight: 550; }
.narrative-body .big-p {
  color: var(--white);
  font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 30px;
}
.narrative-body .big-p em { color: var(--sage-light); }

/* Beyond work */
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.beyond-card { padding: 30px 28px; grid-column: span 1; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.beyond-card.span-2 { grid-column: span 2; }
.beyond-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-deep), inset 0 1px 0 var(--glass-edge); }
.beyond-card h3 { margin-bottom: 12px; }
.beyond-card p { color: var(--white-soft); font-size: 15.5px; line-height: 1.6; margin: 0; }
.beyond-card em { color: var(--sage-light); font-style: italic; }

@media (max-width: 860px) {
  .narrative-grid { grid-template-columns: 1fr; }
  .narrative-aside { position: static; }
  .beyond-grid { grid-template-columns: 1fr; }
  .beyond-card.span-2 { grid-column: span 1; }
}

/* ===========================================================
   Page: WORK
   =========================================================== */
.projects { padding: 20px 0 40px; }
.project {
  padding: clamp(34px, 5vw, 56px) 0;
  border-top: 1px solid rgba(255,255,255,0.13);
}
.project:first-child { border-top: none; }
.project-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
}
.project-meta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.project-num { font-size: 14px; font-weight: 600; letter-spacing: 0.1em; color: var(--white-faint); }
.project-intro h2 { font-size: clamp(28px, 3.6vw, 44px); }
.project-intro .role {
  display: inline-block;
  margin: 12px 0 18px;
  font-size: 15px;
  font-weight: 550;
  color: var(--sage-light);
}
.project-intro p { color: var(--white-soft); font-size: 17px; line-height: 1.62; max-width: 60ch; margin: 0 0 22px; }
.project-intro strong { color: var(--white); font-weight: 600; }
.project-intro em { color: var(--sage-light); font-style: normal; font-weight: 550; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06);
}
.tag-ai   { color: #d9e7d4; border-color: rgba(178,201,173,0.5); }
.tag-fin  { color: #e6eddf; }
.tag-math { color: #c6d8c2; }

.tag-row { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: 13px;
  white-space: nowrap;
  color: var(--white-soft);
  padding: 7px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
}

.project-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
  margin-left: calc(200px + clamp(24px, 4vw, 60px));
}
.project-shots figure { margin: 0; }
.project-shots .shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
/* Taller frame so a contained screenshot shows in full */
.project-shots .shot-tall { aspect-ratio: 4 / 3.4; }
/* Square frame (logo) — sized ~ the prior frame's height */
.project-shots .shot-square { aspect-ratio: 1 / 1; width: min(100%, 250px); height: auto; }
/* Clickable image frames */
.project-shots .shot-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
  border-radius: 16px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), opacity 0.3s var(--ease);
}
.project-shots .shot-link:hover { transform: translateY(-4px); }
.project-shots .shot-link:hover .shot { box-shadow: var(--shadow-deep); border-color: var(--sage); }
.project-shots .shot-link:focus-visible { outline: 2px solid var(--sage-light); outline-offset: 4px; }
.project-shots figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--white-faint);
}

.project-stat {
  margin-top: 30px;
  margin-left: calc(200px + clamp(24px, 4vw, 60px));
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 30px;
}
.stat-num {
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--sage-light);
}
.stat-label { font-size: 15px; color: var(--white-soft); max-width: 24ch; line-height: 1.4; }

/* Honors */
.honors-row { display: flex; flex-wrap: wrap; gap: 14px; }
.honor {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 16px 24px;
  font-size: 15.5px;
  font-weight: 500;
  border-radius: 100px;
}
.honor-ico { color: var(--sage-light); font-size: 13px; }

@media (max-width: 760px) {
  .project-head { grid-template-columns: 1fr; gap: 16px; }
  .project-meta { flex-direction: row; align-items: center; }
  .project-shots { grid-template-columns: 1fr; margin-left: 0; }
  .project-stat { margin-left: 0; }
}

/* ===========================================================
   Page: CONNECT
   =========================================================== */
.connect-primary { margin-top: 36px; }
.btn.big { font-size: 18px; padding: 18px 32px; }

/* Form + LinkedIn layout */
.connect-main { padding-top: clamp(10px, 3vh, 40px); }
.connect-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(22px, 3vw, 36px);
  align-items: start;
}

.contact-form { padding: clamp(28px, 3.4vw, 44px); }
.form-row { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.form-row label {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-light);
  font-weight: 550;
}
.form-row input,
.form-row textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--white);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  resize: vertical;
}
.form-row textarea { min-height: 120px; line-height: 1.55; }
.form-row input::placeholder,
.form-row textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--sage);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(145, 172, 143, 0.22);
}
.form-row input:user-invalid,
.form-row textarea:user-invalid { border-color: #c98a7a; }
.form-hint { font-size: 12.5px; color: var(--white-faint); }

/* Honeypot — hidden from humans, visible to bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.contact-form .btn { margin-top: 4px; border: 0; cursor: pointer; }
.contact-form .btn:disabled { opacity: 0.7; cursor: progress; }

.form-status {
  margin: 16px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 52ch;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.form-status.show { opacity: 1; transform: translateY(0); }
.form-status.success { color: var(--sage-light); }
.form-status.error { color: #f0b6a6; }

/* Side column */
.connect-side { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 36px); }
.linkedin-card { min-height: 0; }
.li-glyph { width: 30px; height: 30px; color: var(--sage-light); margin-bottom: 4px; }
.connect-note {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 22px;
  font-size: 14.5px;
  color: var(--white-soft);
  border-radius: var(--radius-md);
}
.note-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--sage-light);
  box-shadow: 0 0 10px var(--sage-light);
}

/* Celestial sandbox widget */
.orbit-card { padding: 16px 16px 14px; }
.orbit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.orbit-title {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-light);
  font-weight: 550;
}
.orbit-reset {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white-soft);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.4s var(--ease);
}
.orbit-reset svg { width: 14px; height: 14px; }
.orbit-reset:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); transform: rotate(-35deg); }
.orbit-canvas {
  display: block;
  width: 100%;
  height: 210px;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(46, 56, 41, 0.55), rgba(30, 38, 27, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: crosshair;
  touch-action: none;
}
.orbit-hint {
  display: block;
  margin-top: 9px;
  font-size: 12px;
  color: var(--white-faint);
  text-align: center;
}

.connect-cards-sec { padding-top: clamp(20px, 4vh, 50px); }
.connect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.connect-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 30px;
  text-decoration: none;
  color: var(--white);
  min-height: 190px;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.45s var(--ease);
}
.connect-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-deep), inset 0 1px 0 var(--glass-edge); }
.cc-kind { font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-light); }
.cc-val { font-size: clamp(19px, 2.2vw, 23px); font-weight: 550; letter-spacing: -0.01em; margin-top: 2px; }
.cc-go { margin-top: auto; font-size: 14.5px; color: var(--white-soft); display: inline-flex; align-items: center; gap: 8px; }
.connect-card .arr { transition: transform 0.35s var(--ease); }
.connect-card:hover .arr { transform: translateX(4px); }

.signoff { padding-top: clamp(20px, 4vh, 50px); }
.signoff-panel {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 44px);
  padding: clamp(34px, 5vw, 54px);
}
.signoff-mono {
  flex: none;
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border-radius: 22px;
  font-size: 30px; font-weight: 600; letter-spacing: -0.5px;
  color: var(--ink-on-light);
  background: rgba(255,255,255,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 10px 24px -12px rgba(0,0,0,0.4);
}
.signoff-line { font-size: clamp(20px, 2.6vw, 28px); font-weight: 550; letter-spacing: -0.015em; color: var(--ink-on-light); margin: 0 0 8px; }
.signoff-sub { font-size: 16px; color: rgba(44,55,39,0.75); margin: 0; }

@media (max-width: 760px) {
  .connect-grid { grid-template-columns: 1fr; }
  .connect-layout { grid-template-columns: 1fr; }
  .signoff-panel { flex-direction: column; text-align: center; align-items: center; }
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 760px) {
  .nav { padding: 10px 12px 10px 16px; }
  .brand .brand-name { display: none; }
  .nav-links {
    position: fixed;
    top: 78px; left: 50%;
    transform: translateX(-50%) translateY(-12px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: calc(100% - 40px);
    max-width: 420px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(52, 63, 48, 0.82);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--shadow-deep);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav-links a { padding: 14px 18px; font-size: 16px; text-align: center; }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 11px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    cursor: pointer;
  }
  .nav-toggle span { display: block; width: 17px; height: 1.6px; background: var(--white); border-radius: 2px; transition: 0.3s; }
  .nav-toggle span + span { margin-top: 4px; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }
}
