*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


.editors-note{
    position: absolute;

    top: 4rem;
    right: 4rem;

    max-width: 220px;

    padding: 1.25rem;

    background: rgba(255,255,255,0.6);

    border: 1px solid rgba(31,41,55,0.08);

    border-radius: 12px;

    backdrop-filter: blur(4px);

    transform: rotate(-2deg);

    box-shadow:
        0 10px 30px rgba(0,0,0,0.06);

    z-index: 10;
}

.note-label{
    display: block;

    margin-bottom: 0.75rem;

    font-size: 0.65rem;

    letter-spacing: 0.25em;

    text-transform: uppercase;

    color: var(--accent-teal);

    font-weight: 600;
}

.editors-note p{
    margin: 0;

    font-family: "Cormorant Garamond", serif;

    font-size: 1.35rem;

    line-height: 1.25;

    color: var(--text-primary);
}

#archive-title{
    font-size: 8rem;
}

.projects-header {
    position: relative;
    padding: 8rem 0 5rem;
    overflow: hidden;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(31, 41, 55, 0.15);
}

.section-divider span {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    color: #2BBAA5;
}

.archive-heading {
    position: relative;
    min-height: 260px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.archive-bg {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    font-family: "Cormorant Garamond", serif;

    font-size: clamp(10rem, 20vw, 22rem);

    line-height: 0.8;

    letter-spacing: -0.06em;

    white-space: nowrap;

    color: #1F2937;

    opacity: 0.08;

    pointer-events: none;

    user-select: none;
}


:root {
  --bg: #FAFCF7;
  --text: #1F2937;
  --teal: #2BBAA5;
  --orange: #F96635;
  --yellow: #F9A822;
  --white: #FFFFFF;
  --surface: #F5F5F0;
  --muted: #EAEAE4;
  --text-muted: #6B7280;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* GRAIN OVERLAY */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem 4vw;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(250,252,247,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: box-shadow 0.3s;
}
.nav-logo { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.nav-logo span { color: var(--teal); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.82rem; font-weight: 500; color: var(--text-muted); text-decoration: none;
  letter-spacing: 0.05em; text-transform: uppercase; transition: color 0.2s; position: relative;
}
.nav-links a::after { content:''; position:absolute; bottom:-2px; left:0; right:0; height:1px; background:var(--teal); transform:scaleX(0); transition:transform 0.3s; transform-origin:left; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { background: var(--text) !important; color: var(--white) !important; padding: 0.45rem 1.1rem !important; border-radius:100px !important; }
.nav-cta:hover { background: var(--teal) !important; }
.nav-cta::after { display: none !important; }

/* HERO */
#hero {
  min-height: 100vh; padding: 0 4vw; padding-top: 80px;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; position: relative; overflow: hidden;
}
.hero-left { position: relative; z-index: 2; padding-top: 4rem; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 0.6s 0.2s ease forwards;
}
.hero-eyebrow::before { content:''; width:24px; height:2px; background:var(--teal); display:block; }
.hero-headline {
  font-family: var(--serif); font-size: clamp(3.5rem,8vw,7rem);
  font-weight: 900; line-height: 0.92; letter-spacing: -0.03em; margin-bottom: 1.5rem;
}
.hero-headline .line { display: block; overflow: hidden; }
.hero-headline .line span { display:block; transform:translateY(100%); animation: slideUp 0.8s ease forwards; }
.hero-headline .line:nth-child(1) span { animation-delay:0.3s; }
.hero-headline .line:nth-child(2) span { animation-delay:0.45s; }
.hero-headline .line:nth-child(3) span { animation-delay:0.6s; }
.hero-headline .line:nth-child(4) span { animation-delay:0.72s; }
.accent-outline { -webkit-text-stroke: 2px var(--text); color: transparent; }
.accent-teal { color: var(--teal); }
.hero-sub { font-size: 1rem; color: var(--text-muted); max-width: 380px; margin-bottom: 2.5rem; line-height: 1.8; opacity:0; animation: fadeUp 0.6s 0.9s ease forwards; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; opacity:0; animation: fadeUp 0.6s 1s ease forwards; }
.hero-tag { font-size:0.72rem; font-weight:600; letter-spacing:0.06em; text-transform:uppercase; padding:0.28rem 0.8rem; border-radius:100px; border:1.5px solid currentColor; }
.tag-teal { color:var(--teal); background:rgba(43,186,165,0.08); }
.tag-orange { color:var(--orange); background:rgba(249,102,53,0.08); }
.tag-yellow { color:#c17d0a; background:rgba(249,168,34,0.12); }
.hero-actions { display:flex; gap:1rem; flex-wrap:wrap; opacity:0; animation: fadeUp 0.6s 1.1s ease forwards; }
.btn-primary {
  background:var(--text); color:var(--white); padding:0.85rem 2rem; border-radius:100px;
  font-size:0.9rem; font-weight:600; text-decoration:none; border:none; cursor:pointer;
  display:inline-flex; align-items:center; gap:0.5rem; letter-spacing:0.02em; transition:all 0.3s;
}
.btn-primary:hover { background:var(--teal); transform:translateY(-2px); box-shadow:0 12px 32px rgba(43,186,165,0.3); }
.btn-secondary {
  background:transparent; color:var(--text); padding:0.85rem 2rem; border-radius:100px;
  font-size:0.9rem; font-weight:600; text-decoration:none; border:2px solid var(--muted);
  display:inline-flex; align-items:center; gap:0.5rem; transition:all 0.3s;
}
.btn-secondary:hover { border-color:var(--text); transform:translateY(-2px); }
.hero-right {
  position:relative; display:flex; justify-content:center; align-items:stretch;
  min-height:70vh; opacity:0; animation: fadeIn 1s 0.5s ease forwards;
}
/* ═══════════════════════════════════
   EDITORIAL COMPOSITION — hero right
   v6: notebook-centred, one big thing
═══════════════════════════════════ */

/* Stage — centres the whole cluster */
.editorial-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The cluster is a single fixed-size container so
   everything is positioned relative to it, not the
   full column. This kills the "scattered in void" problem. */
.ep-cluster {
  position: relative;
  width: 420px;
  height: 480px;
  flex-shrink: 0;
}

/* ── shared base for every piece ── */
.ep {
  position: absolute;
  background: #FFFFFF;
  border-radius: 3px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.09), 0 10px 28px rgba(0,0,0,0.07);
  transition:
    transform 0.38s cubic-bezier(.22,1,.36,1),
    box-shadow 0.38s ease;
  opacity: 0;
}
.ep:hover {
  box-shadow: 0 10px 32px rgba(0,0,0,0.15), 0 24px 52px rgba(0,0,0,0.09);
  z-index: 99 !important;
}

/* entrance — every piece drops in from slightly above */
@keyframes paperDrop {
  from {
    opacity: 0;
    transform: var(--ep-from, translateY(-16px) rotate(var(--ep-rot, 0deg)));
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--ep-rot, 0deg));
  }
}
.ep { animation: paperDrop 0.65s cubic-bezier(.22,1,.36,1) forwards; }

/* ─────────────────────────────────
   NOTEBOOK — the hero piece
───────────────────────────────── */
.ep-notebook {
  background: #FEFDF8;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 4px;
  padding: 22px 20px 20px;
  /* ruled lines as repeating gradient */
  background-image:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(43,186,165,0.12) 27px,
      rgba(43,186,165,0.12) 28px
    );
  background-size: 100% 28px;
  background-position: 0 36px; /* offset so first line is below header */
}

/* red margin line on the left */
.ep-notebook::before {
  content: '';
  position: absolute;
  left: 44px; top: 0; bottom: 0;
  width: 1px;
  background: rgba(249,102,53,0.22);
  border-radius: 0;
}

.nb-header {
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1.5px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.nb-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nb-date {
  font-family: var(--sans);
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* each ruled row in the notebook */
.nb-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  height: 28px; /* matches the background-size */
  padding-left: 10px; /* indent past the red margin line */
}
.nb-row .nb-yr {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.06em;
  min-width: 30px;
  flex-shrink: 0;
}
.nb-row .nb-arrow {
  color: rgba(0,0,0,0.2);
  font-size: 0.6rem;
  flex-shrink: 0;
}
.nb-row .nb-skill {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1;
}
/* the "now" row gets a highlight */
.nb-row-now .nb-yr  { color: var(--orange); }
.nb-row-now .nb-skill { font-weight: 700; font-style: normal; color: var(--orange); }

.nb-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.1);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* hover lift for notebook */
.ep-notebook:hover {
  transform: rotate(var(--ep-rot,0deg)) translateY(-5px) !important;
}

/* ─────────────────────────────────
   POLAROID
───────────────────────────────── */
.ep-polaroid {
  padding: 8px 8px 24px;
  background: #FEFEFE;
  border: 1px solid rgba(0,0,0,0.06);
}
.ep-polaroid-img {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  overflow: hidden;
}
.ep-polaroid-caption {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
  text-align: center;
  margin-top: 5px;
  line-height: 1.3;
}
.ep-polaroid:hover {
  transform: rotate(var(--ep-rot,0deg)) translateY(-6px) scale(1.04) !important;
}

/* ─────────────────────────────────
   ACHIEVEMENT TAG
───────────────────────────────── */
.ep-achievement {
  padding: 12px 16px;
  background: linear-gradient(135deg, #2BBAA5, #1a8a78);
  border-radius: 8px;
  border: none;
  box-shadow: 0 6px 20px rgba(43,186,165,0.32);
}
.ep-achievement-label {
  font-family: var(--sans);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}
.ep-achievement-value {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.ep-achievement-sub {
  margin-top: 5px;
  font-size: 0.54rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ep-achievement:hover {
  transform: rotate(var(--ep-rot,0deg)) translateY(-5px) scale(1.04) !important;
}

/* ─────────────────────────────────
   STICKY NOTE
───────────────────────────────── */
.ep-sticky {
  padding: 12px 14px;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.7rem;
  line-height: 1.55;
}
.ep-sticky strong {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 4px;
}
.ep-sticky:hover {
  transform: rotate(var(--ep-rot,0deg)) translateY(-5px) !important;
}

/* ─────────────────────────────────
   TORN QUOTE SLIP
───────────────────────────────── */
.ep-quote {
  padding: 10px 14px;
  background: #FAFAF6;
  border-left: 3px solid var(--orange);
  border-radius: 0 3px 3px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.72rem;
  color: #555;
  line-height: 1.55;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ep-quote:hover {
  transform: rotate(var(--ep-rot,0deg)) translateY(-4px) !important;
}

/* ─────────────────────────────────
   TAPE STRIP
───────────────────────────────── */
.ep-tape {
  height: 20px;
  border-radius: 1px;
  border: none;
  box-shadow: none !important;
  z-index: 50 !important;
  /* subtle inner highlight so it looks like real tape */
  background: rgba(249,168,34,0.32);
  border-top: 1px solid rgba(249,168,34,0.18);
  border-bottom: 1px solid rgba(249,168,34,0.18);
}

/* ─────────────────────────────────
   PIN DOT (tiny push-pin mark)
───────────────────────────────── */
.ep-pin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
  z-index: 60 !important;
}
.scroll-hint {
  position:absolute; bottom:2rem; left:4vw; display:flex; align-items:center; gap:0.75rem;
  font-size:0.72rem; color:var(--text-muted); letter-spacing:0.08em; text-transform:uppercase;
  opacity:0; animation: fadeUp 0.6s 1.8s ease forwards;
}
.scroll-line { width:40px; height:1px; background:var(--text-muted); position:relative; overflow:hidden; }
.scroll-line::after {
  content:''; position:absolute; inset:0; background:var(--teal);
  transform:translateX(-100%); animation: scrollSlide 2s 2s ease-in-out infinite;
}
@keyframes scrollSlide { 0%,100%{transform:translateX(-100%)} 50%{transform:translateX(0)} 100%{transform:translateX(100%)} }

/* SECTION SHARED */
section { padding: 7rem 4vw; }
.section-label {
  font-size:0.72rem; font-weight:700; letter-spacing:0.15em; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:1rem; display:flex; align-items:center; gap:0.6rem;
}
.section-label::before { content:''; width:20px; height:2px; background:var(--teal); }
.section-title { font-family:var(--serif); font-size:clamp(2.2rem,5vw,4rem); font-weight:1200; line-height:1.1; letter-spacing:-0.02em; margin-bottom:1.5rem; }

/* ═══════════════════════════════════
   ABOUT — BENTO LAYOUT
═══════════════════════════════════ */
#about { background: var(--white); }
.about-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: 1.25rem;
}
/* Left col: text spans full height */
.bento-text {
  grid-column: 1; grid-row: 1 / 3;
  background: var(--bg);
  border-radius: 24px;
  padding: 2.5rem;
  border: 1px solid var(--muted);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; justify-content: space-between;
}
.about-intro-text { font-size: clamp(1rem,1.6vw,1.15rem); line-height: 1.85; color: var(--text); }
.about-intro-text strong { color: var(--teal); font-weight: 600; }
.about-intro-text em { font-family:var(--serif); font-style:italic; color:var(--orange); }
.about-quote {
  margin: 1.8rem 0;
  padding: 1.2rem 0 1.2rem 1.4rem;
  border-left: 3px solid var(--yellow);
  font-family: var(--serif); font-size: 1.2rem; font-style: italic; line-height: 1.6;
}
/* Right top: wide stat card */
.bento-stat-wide {
  grid-column: 2; grid-row: 1;
  background: linear-gradient(135deg, rgba(43,186,165,0.1), rgba(43,186,165,0.04));
  border: 1px solid rgba(43,186,165,0.22);
  border-radius: 24px;
  padding: 2rem 2.5rem;
  display: flex; align-items: center; gap: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transition: transform 0.25s, box-shadow 0.25s;
}
.bento-stat-wide:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(43,186,165,0.15); }
.bento-big-num { font-family:var(--serif); font-size: 3.8rem; font-weight:900; color:var(--teal); line-height:1; }
.bento-big-label { font-size:0.75rem; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--text-muted); margin-top:0.3rem; }
/* Right bottom: 2 small cards side by side */
.bento-small-row {
  grid-column: 2; grid-row: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
.bento-mini {
  background: var(--bg); border-radius: 20px; padding: 1.4rem 1.6rem;
  border: 1px solid var(--muted); box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.bento-mini:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.bento-mini-label { font-size:0.68rem; font-weight:700; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); margin-bottom:0.3rem; }
.bento-mini-value { font-family:var(--serif); font-size:1.05rem; font-weight:700; color:var(--text); line-height:1.3; }
/* Row 3: three cards across full width */
.bento-bottom-row {
  grid-column: 1 / -1; grid-row: 3;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem;
}
.bento-fact {
  background: var(--bg); border-radius: 20px; padding: 1.5rem 1.8rem;
  border: 1px solid var(--muted); box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.bento-fact::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; }
.bento-fact.fact-teal::before { background: var(--teal); }
.bento-fact.fact-orange::before { background: var(--orange); }
.bento-fact.fact-yellow::before { background: var(--yellow); }
.bento-fact:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.bento-fact-emoji { font-size:1.6rem; margin-bottom:0.6rem; display:block; }
.bento-fact-label { font-size:0.68rem; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--text-muted); margin-bottom:0.3rem; }
.bento-fact-value { font-family:var(--serif); font-size:1.1rem; font-weight:700; color:var(--text); }

/* SKILLS */
/* =========================
   TOOLBOX SECTION — v2
========================= */

.toolbox-section {
    padding: 10rem 0;
}

.toolbox-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
}

/* LEFT */

.toolbox-heading-column {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.toolbox-label {
    display: block;
    margin-bottom: 1rem;
    font-size: .8rem;
    letter-spacing: .15em;
    color: #6B7280;
}

.toolbox-title {
    font-size: clamp(4rem, 8vw, 8rem);
    line-height: .85;
    letter-spacing: -0.08em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

/* RIGHT */

.toolbox-stack {
    display: flex;
    flex-direction: column;
    /* tall enough for the sticky stacking scroll effect (4 cards × ~220px each) */
    padding-bottom: 30vh;
}

/* CARDS */

.toolbox-card {
    /* sticky stacking — each card pins and the next slides over it */
    position: sticky;
    top: var(--card-top, 100px);

    padding: 2rem 2.25rem;
    border-radius: 24px;

    /* fully opaque white — critical so stacked cards fully occlude cards behind them */
    background: #FFFFFF;

    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 6px 24px rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    will-change: transform, opacity;

    /* push card far below so it is completely invisible before entering —
       prevents lower cards from peeking through the sticky stack */
    opacity: 0;
    transform: translateY(120px);
    transition:
        opacity  .58s cubic-bezier(.22,1,.36,1),
        transform .58s cubic-bezier(.22,1,.36,1),
        box-shadow .3s ease,
        background .3s ease,
        border-color .3s ease;
}

.toolbox-card.card-in {
    opacity: 1;
    transform: translateY(0);
}

/* when the next card has stacked on top — fade + shrink this one back */
.toolbox-card.card-covered {
    opacity: 0.3;
    transform: scale(0.97) translateY(0);
}

.toolbox-card:hover {
    box-shadow: 0 20px 56px rgba(0,0,0,.11);
}

/* Accent top borders */
.card-1 { border-top: 4px solid #2BBAA5; }
.card-2 { border-top: 4px solid #F96635; }
.card-3 { border-top: 4px solid #F9A822; }
.card-4 { border-top: 4px solid #E8448A; }

/* Hover: card tints with its accent color — fully opaque backgrounds, no transparency */
.card-1:hover { border-color: #2BBAA5; background: #f0fdfb; }
.card-2:hover { border-color: #F96635; background: #fff5f1; }
.card-3:hover { border-color: #F9A822; background: #fffbf0; }
.card-4:hover { border-color: #E8448A; background: #fff0f6; }

/* CARD HEADER ROW: number + title side by side */
.card-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.card-index {
    font-family: 'Syne', var(--serif);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: #E5E7EB;
    letter-spacing: -0.04em;
    transition: color .35s ease;
    user-select: none;
    flex-shrink: 0;
}

.card-1:hover .card-index { color: rgba(43,186,165,.35); }
.card-2:hover .card-index { color: rgba(249,102,53,.35); }
.card-3:hover .card-index { color: rgba(249,168,34,.4); }
.card-4:hover .card-index { color: rgba(232,68,138,.3); }

.card-title {
    font-family: 'Space Grotesk', var(--sans);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text);
    transition: transform .3s ease;
}

.toolbox-card:hover .card-title {
    transform: translateX(3px);
}

/* SKILLS GRID — squares, flexible layout by count */

.card-skills {
    display: grid;
    gap: .6rem;
    /* columns auto-set by JS via --cols custom prop, default 3 */
    grid-template-columns: repeat(var(--cols, 3), 1fr);
}

/* Each square skill tag */
.skill-square {
    background: #F3F4F6;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    padding: .65rem .5rem;
    font-family: 'Space Grotesk', var(--sans);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-align: center;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    /* fade-in stagger — JS adds .sq-in + transition-delay inline */
    opacity: 0;
    transform: scale(.88);
    transition: opacity .35s ease, transform .35s ease, background .25s ease, color .25s ease, border-color .25s ease;
}

.skill-square.sq-in {
    opacity: 1;
    transform: scale(1);
}

/* accent color on squares when card hovered */
.card-1:hover .skill-square { background: rgba(43,186,165,.1); border-color: rgba(43,186,165,.25); color: #1a7a6e; }
.card-2:hover .skill-square { background: rgba(249,102,53,.09); border-color: rgba(249,102,53,.22); color: #b84520; }
.card-3:hover .skill-square { background: rgba(249,168,34,.12); border-color: rgba(249,168,34,.3); color: #8a5e00; }
.card-4:hover .skill-square { background: rgba(232,68,138,.08); border-color: rgba(232,68,138,.22); color: #b02266; }

/* MOBILE */

@media(max-width:900px) {
    .toolbox-layout {
        grid-template-columns: 1fr;
    }

    .toolbox-heading-column {
        position: relative;
        top: 0;
    }

    .toolbox-title {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 4rem;
    }

    .toolbox-stack {
        padding-bottom: 0;
    }

    .toolbox-card {
        position: relative;
        top: 0 !important;
        margin-bottom: 1.25rem;
    }
}

/* PROJECTS — fixed accordion: no grid-column span trick */
#projects { background: var(--white); }
.projects-header { max-width:600px; margin-bottom:4rem; }
.projects-list { display: flex; flex-direction: column; gap: 1rem; }
.project-card {
  background: var(--bg); border-radius: 20px; border: 1px solid var(--muted);
  overflow: hidden; cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.project-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.09); border-color: rgba(43,186,165,0.3); }
.project-card.open { border-color: rgba(43,186,165,0.4); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.project-card-header {
  padding: 1.6rem 2rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
}
.project-header-left { display:flex; align-items:center; gap:1.5rem; flex:1; }
.project-num {
  font-family:var(--serif); font-size:2.8rem; font-weight:900;
  color:var(--muted); line-height:1; transition:color 0.25s; user-select:none; flex-shrink:0;
}
.project-card:hover .project-num, .project-card.open .project-num { color:var(--teal); }
.project-title { font-family:var(--serif); font-size:1.25rem; font-weight:700; margin-bottom:0.2rem; line-height:1.2; }
.project-subtitle { font-size:0.78rem; color:var(--text-muted); font-weight:500; }
.project-color-dot {
  width:10px; height:10px; border-radius:50%; flex-shrink:0;
}
.project-toggle-icon {
  width:34px; height:34px; border-radius:50%;
  border:1.5px solid var(--muted); display:flex; align-items:center; justify-content:center;
  font-size:1.1rem; transition:all 0.25s; flex-shrink:0;
  background:var(--white); font-weight:700; color:var(--text-muted);
}
.project-card.open .project-toggle-icon { background:var(--teal); border-color:var(--teal); color:var(--white); transform:rotate(45deg); }
/* KEY FIX: use grid rows for smooth open/close — no laggy max-height on large content */
.project-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.4,0,0.2,1);
}
.project-card.open .project-body { grid-template-rows: 1fr; }
.project-body-inner {
  overflow: hidden;
}
.project-body-content {
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid var(--muted);
}
.project-color-band { height:3px; transition: none; }
.project-desc { font-size:0.93rem; line-height:1.75; color:var(--text); margin-bottom:1.4rem; }
.project-stack { display:flex; flex-wrap:wrap; gap:0.4rem; margin-bottom:1.4rem; }
.stack-tag { font-size:0.7rem; font-weight:700; letter-spacing:0.06em; padding:0.22rem 0.7rem; background:var(--white); border:1px solid var(--muted); border-radius:100px; color:var(--text-muted); text-transform:uppercase; }
.project-features { margin-bottom:1.4rem; }
.project-features h4 { font-size:0.72rem; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--text-muted); margin-bottom:0.6rem; }
.project-features ul { list-style:none; display:flex; flex-direction:column; gap:0.3rem; }
.project-features li { font-size:0.87rem; display:flex; align-items:flex-start; gap:0.5rem; color:var(--text); }
.project-features li::before { content:'→'; color:var(--teal); font-weight:700; }
.project-links { display:flex; gap:0.75rem; }
.project-link { display:inline-flex; align-items:center; gap:0.4rem; font-size:0.82rem; font-weight:600; padding:0.55rem 1.2rem; border-radius:100px; text-decoration:none; transition:all 0.2s; }
.link-github { background:var(--text); color:var(--white); }
.link-github:hover { background:#374151; }
.link-demo { background:var(--white); color:var(--text); border:1.5px solid var(--muted); }
.link-demo:hover { border-color:var(--teal); color:var(--teal); }

/* OPEN SOURCE */
#opensource { position:relative; overflow:hidden; }
.os-header { max-width:600px; margin-bottom:4rem; }
.os-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:1.25rem; }
.os-card {
  background:var(--white); border-radius:20px; padding:1.6rem; border:1px solid var(--muted);
  box-shadow:0 4px 20px rgba(0,0,0,0.05); transition:all 0.3s ease;
  position:relative; overflow:hidden;
}
.os-card:hover { transform:translateY(-4px); box-shadow:0 12px 40px rgba(0,0,0,0.1); }
.os-card-type { font-size:0.7rem; font-weight:700; letter-spacing:0.12em; text-transform:uppercase; margin-bottom:0.8rem; }
.os-card-title { font-family:var(--serif); font-size:1.15rem; font-weight:700; margin-bottom:0.5rem; line-height:1.3; }
.os-card-desc { font-size:0.85rem; color:var(--text-muted); line-height:1.6; margin-bottom:1rem; }
.os-card-meta { display:flex; align-items:center; justify-content:space-between; }
.os-badge { font-size:0.72rem; font-weight:700; padding:0.25rem 0.75rem; border-radius:100px; }
.badge-merged { background:rgba(43,186,165,0.12); color:var(--teal); }
.badge-active { background:rgba(249,168,34,0.15); color:#9a6800; }
.gssoc-banner {
  background:linear-gradient(135deg,rgba(43,186,165,0.1),rgba(249,168,34,0.08));
  border:1px solid rgba(43,186,165,0.2); border-radius:20px; padding:2rem 2.5rem;
  margin-bottom:2.5rem; display:flex; align-items:center; justify-content:space-between; gap:2rem; flex-wrap:wrap;
}
.gssoc-title { font-family:var(--serif); font-size:1.5rem; font-weight:700; margin-bottom:0.3rem; }
.gssoc-sub { font-size:0.9rem; color:var(--text-muted); }
.gssoc-stats { display:flex; gap:2rem; }
.gssoc-stat-num { font-family:var(--serif); font-size:2rem; font-weight:900; color:var(--teal); line-height:1; }
.gssoc-stat-label { font-size:0.72rem; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-muted); }

/* ═══════════════════════════════════
   STACK SECTION — scroll-triggered stacking
═══════════════════════════════════ */
.sticky-stack-section {
  padding: 6rem 4vw;
  background: var(--surface);
  overflow: hidden;
}
.sticky-stack-intro { text-align:center; max-width:500px; margin:0 auto 5rem; }
.cards-stack-wrapper {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
/* Each card is initially stacked (overlapping), then fans out via JS on scroll */
.stack-card {
  background: var(--white);
  border-radius: 24px;
  padding: 2.2rem 2.8rem;
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
  border: 1px solid var(--muted);
  display: flex; align-items: flex-start; gap: 1.5rem;
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.3s;
  margin-bottom: 1rem;
}
.stack-card:nth-child(1) { background: var(--white); transform: rotate(-10deg); }
.stack-card:nth-child(2) { background: rgba(43,186,165,0.07); margin-left: 3rem; }
.stack-card:nth-child(3) { background: rgba(249,102,53,0.06); transform: rotate(12deg);}
.stack-card:nth-child(4) { background: rgba(249,168,34,0.08); margin-left: 5rem;}
.stack-card.card-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.stack-card:hover {
  box-shadow: 0 24px 64px rgba(0,0,0,0.14);
  transform: translateY(-4px) scale(1.01);
}

.stack-card-body {}
.stack-card-title { font-family:var(--serif); font-size:1.3rem; font-weight:700; margin-bottom:0.35rem; }
.stack-card-sub { font-size:0.88rem; color:var(--text-muted); line-height:1.65; }

/* ACHIEVEMENTS */
#achievements { background:var(--white); }
.achieve-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1.5rem; margin-top:3rem; }
.achieve-card {
  background:var(--bg); border-radius:24px; padding:2rem; border:1px solid var(--muted);
  position:relative; overflow:hidden; box-shadow:0 4px 20px rgba(0,0,0,0.04);
  transition: transform 0.3s cubic-bezier(0.34,1.3,0.64,1), box-shadow 0.3s;
  cursor:default;
}
.achieve-card::after {
  content:'';
  position:absolute; inset:0; border-radius:24px;
  background:radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(43,186,165,0.08) 0%, transparent 60%);
  opacity:0; transition:opacity 0.3s;
  pointer-events:none;
}
.achieve-card:hover { transform: translateY(-8px) rotate(-0.4deg); box-shadow: 0 20px 56px rgba(0,0,0,0.12); }
.achieve-card:hover::after { opacity:1; }
.achieve-card-inner { position:relative; z-index:1; }
.achieve-icon { font-size:2.4rem; margin-bottom:1rem; display:block; }
.achieve-title { font-family:var(--serif); font-size:1.3rem; font-weight:700; margin-bottom:0.4rem; line-height:1.3; }
.achieve-org { font-size:0.78rem; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; margin-bottom:0.8rem; }
.achieve-desc { font-size:0.87rem; color:var(--text-muted); line-height:1.65; }
.achieve-year { position:absolute; top:1.5rem; right:1.5rem; font-size:0.72rem; font-weight:700; letter-spacing:0.1em; color:var(--text-muted); opacity:0.5; }

/* ═══════════════════════════════════
   TIMELINE — single column with scroll animation
═══════════════════════════════════ */
#timeline { background: var(--text); color: var(--white); }
.timeline-label { color:rgba(255,255,255,0.5); }
.timeline-label::before { background:var(--teal); }
.timeline-title { color:var(--white); }
.timeline-track {
  position:relative; margin-top:4rem; padding-left:2.5rem; max-width:680px;
}
.timeline-track::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:2px;
  background:rgba(255,255,255,0.08);
}
/* Animated line that grows as you scroll */
.timeline-track::after {
  content:''; position:absolute; left:0; top:0; width:2px; height:0;
  background:var(--teal); transition:height 0.6s ease; z-index:1;
}
.timeline-item {
  position:relative; margin-bottom:3rem;
  opacity:0; transform:translateX(-28px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.34,1.1,0.64,1);
}
.timeline-item.visible { opacity:1; transform:translateX(0); }
.timeline-dot {
  position:absolute; left:-2.5rem; top:0.25rem; width:14px; height:14px;
  border-radius:50%; border:2px solid rgba(255,255,255,0.2); background:var(--text);
  transform:translateX(-6px); transition:all 0.4s cubic-bezier(0.34,1.4,0.64,1); z-index:2;
}
.timeline-item.visible .timeline-dot {
  background:var(--teal); border-color:var(--teal);
  box-shadow:0 0 0 4px rgba(43,186,165,0.2);
  transform:translateX(-6px) scale(1.15);
}
.timeline-year { font-size:0.7rem; font-weight:700; letter-spacing:0.12em; text-transform:uppercase; color:var(--teal); margin-bottom:0.35rem; }
.timeline-event { font-family:var(--serif); font-size:1.3rem; font-weight:700; color:var(--white); margin-bottom:0.35rem; line-height:1.3; }
.timeline-detail { font-size:0.87rem; color:rgba(255,255,255,0.52); line-height:1.7; }
.timeline-item-now .timeline-dot { background:var(--yellow) !important; border-color:var(--yellow) !important; box-shadow:0 0 0 4px rgba(249,168,34,0.25) !important; }
.timeline-item-now .timeline-year { color:var(--yellow) !important; }
.timeline-item-now .timeline-event { color:var(--yellow) !important; }

/* ═══════════════════════════════════
   CONTACT — crumpled paper texture, at end
═══════════════════════════════════ */
#contact {
  text-align:center; position:relative; overflow:hidden;
  background: var(--bg);
}
.contact-paper-bg {
  position:absolute; inset:0; pointer-events:none; z-index:0;
  background-color: #F5F3EE;
  background-image:
    repeating-linear-gradient(0deg,   transparent, transparent 28px, rgba(0,0,0,0.018) 28px, rgba(0,0,0,0.018) 29px),
    repeating-linear-gradient(90deg,  transparent, transparent 28px, rgba(0,0,0,0.012) 28px, rgba(0,0,0,0.012) 29px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: auto, auto, 250px 250px;
}
/* Paper fold lines */
.contact-paper-bg::before {
  content:''; position:absolute; inset:0;
  background:
    linear-gradient(108deg, transparent 48%, rgba(0,0,0,0.025) 48.5%, transparent 49%),
    linear-gradient(72deg,  transparent 35%, rgba(0,0,0,0.018) 35.5%, transparent 36%);
}
/* Subtle vignette to "lift" the paper */
.contact-paper-bg::after {
  content:''; position:absolute; inset:0;
  background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(200,195,185,0.18) 100%);
}
.contact-wrap { position:relative; z-index:1; max-width:720px; margin:0 auto; }
.contact-big {
  font-family:var(--serif); font-size:clamp(3rem,8vw,6.5rem);
  font-weight:900; line-height:0.95; letter-spacing:-0.03em; margin-bottom:1.5rem;
}
.contact-big .outline { -webkit-text-stroke:2px var(--text); color:transparent; }
.contact-sub { font-size:1.05rem; color:var(--text-muted); max-width:400px; margin:0 auto 3rem; line-height:1.8; }
.contact-links { display:flex; justify-content:center; gap:1rem; flex-wrap:wrap; margin-bottom:3rem; }
.contact-link {
  display:inline-flex; align-items:center; gap:0.5rem; padding:0.85rem 1.75rem;
  border-radius:100px; font-size:0.9rem; font-weight:600; text-decoration:none;
  transition:all 0.3s; border:2px solid;
}
.cl-email { background:var(--text); color:var(--white); border-color:var(--text); }
.cl-email:hover { background:transparent; color:var(--text); }
.cl-github { background:transparent; color:var(--text); border-color:rgba(0,0,0,0.18); }
.cl-github:hover { border-color:var(--text); }
.cl-linkedin { background:rgba(43,186,165,0.09); color:var(--teal); border-color:rgba(43,186,165,0.35); }
.cl-linkedin:hover { background:var(--teal); color:var(--white); border-color:var(--teal); }
.contact-doodle { font-family:var(--serif); font-style:italic; font-size:1rem; color:var(--text-muted); margin-top:1rem; }

/* FOOTER */
footer {
  background:var(--text); color:rgba(255,255,255,0.6); padding:2.5rem 4vw;
  display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap;
  border-top:1px solid rgba(255,255,255,0.06);
}
.footer-logo { font-family:var(--serif); font-size:1.2rem; font-weight:700; color:var(--white); text-decoration:none; }
.footer-copy { font-size:0.82rem; }
.footer-links { display:flex; gap:1.5rem; }
.footer-links a { color:rgba(255,255,255,0.5); text-decoration:none; font-size:0.82rem; transition:color 0.2s; }
.footer-links a:hover { color:var(--teal); }

/* KEYFRAMES */
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes floatIn { from{opacity:0;transform:scale(0.8) rotate(-8deg)} to{opacity:1} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.reveal {
  opacity:0; transform:translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity:1; transform:translateY(0); }
.reveal-delay-1 { transition-delay:0.1s; }
.reveal-delay-2 { transition-delay:0.2s; }
.reveal-delay-3 { transition-delay:0.3s; }
.reveal-delay-4 { transition-delay:0.4s; }

/* CURSOR */
.cursor-dot {
  width:8px; height:8px; border-radius:50%; background:var(--teal);
  position:fixed; pointer-events:none; z-index:9998; transform:translate(-50%,-50%);
  transition:opacity 0.3s; mix-blend-mode:multiply; opacity:0;
}
.cursor-ring {
  width:36px; height:36px; border-radius:50%; border:1.5px solid rgba(43,186,165,0.4);
  position:fixed; pointer-events:none; z-index:9997; transform:translate(-50%,-50%);
  transition:width 0.2s,height 0.2s,background 0.2s; opacity:0;
}

/* MOBILE */
@media (max-width:768px) {
  #hero { grid-template-columns:1fr; padding-top:100px; padding-bottom:4rem; gap:3rem; }
  .hero-right { min-height:420px; order:-1; }
  .editorial-stage { min-height:420px; }
  .ep-cluster { transform: scale(0.78); }
  nav { padding:1rem 4vw; }
  .nav-links { display:none; }
  .about-bento { grid-template-columns:1fr; }
  .bento-text { grid-row:auto; }
  .bento-stat-wide { grid-column:1; grid-row:auto; }
  .bento-small-row { grid-column:1; grid-row:auto; grid-template-columns:1fr 1fr; }
  .bento-bottom-row { grid-template-columns:1fr; }
  .gssoc-banner { flex-direction:column; gap:1.5rem; }
  .gssoc-stats { gap:1.5rem; }
  footer { flex-direction:column; text-align:center; gap:1rem; }
}
