/* =====================================================================
   Ruchira Patil — portfolio
   "Instrument panel": deep teal-slate, telemetry amber, monospace structure.
   No CDNs. Self-hosted fonts, inline SVG icons.
   ===================================================================== */

/* ----- Fonts (self-hosted, Latin subset) ----- */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/space-grotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/space-grotesk-700.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2'); }

/* ----- Tokens ----- */
:root {
    --ink:      #0C1416;
    --ink-2:    #090F11;
    --panel:    #111C1F;
    --panel-2:  #16242700;
    --raise:    #16262A;
    --line:     #223133;
    --line-2:   #30474B;
    --paper:    #ECE7DC;
    --muted:    #97A6A6;
    --faint:    #63767A;
    --amber:    #E7A94E;
    --amber-soft: rgba(231,169,78,.13);
    --cyan:     #6FD3C9;
    --cyan-soft: rgba(111,211,201,.12);

    --f-display: 'Space Grotesk', system-ui, sans-serif;
    --f-body:    'IBM Plex Sans', system-ui, sans-serif;
    --f-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --r:   14px;
    --r-sm: 9px;
    --maxw: 1120px;
    --pad: clamp(20px, 5vw, 44px);
    --ease: cubic-bezier(.22,.61,.36,1);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--amber); color: var(--ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.ic { width: 1.15em; height: 1.15em; stroke: currentColor; flex: none; }
.brandmark { fill: currentColor; flex: none; }

.skip-link {
    position: fixed; top: 10px; left: 10px; z-index: 200;
    background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: var(--r-sm);
    font-family: var(--f-mono); font-size: .82rem; font-weight: 500;
    transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ----- Monospace "readout" label ----- */
.readout {
    font-family: var(--f-mono);
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
}

/* ---------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------- */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    transition: background .3s var(--ease), border-color .3s var(--ease);
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(10,16,18,.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; }
.brand__mono {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
    background: var(--amber-soft); border: 1px solid rgba(231,169,78,.35);
    color: var(--amber); font-family: var(--f-mono); font-weight: 500; font-size: .92rem; letter-spacing: .02em;
}
.brand__name { font-size: 1rem; }

.nav__menu { display: flex; gap: 4px; }
.nav__menu a {
    display: block; padding: 8px 14px; border-radius: 8px;
    font-family: var(--f-mono); font-size: .82rem; color: var(--muted);
    transition: color .18s var(--ease), background .18s var(--ease);
}
.nav__menu a:hover { color: var(--paper); background: rgba(255,255,255,.04); }
.nav__menu a.active { color: var(--amber); }
.nav__menu a.active::before { content: "· "; color: var(--amber); }

.nav__toggle { display: none; width: 42px; height: 42px; border-radius: 9px; align-items: center; justify-content: center; color: var(--paper); border: 1px solid var(--line); }
.nav__toggle .ic { width: 22px; height: 22px; }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 96px 0 72px; }
.hero__grid {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(120% 90% at 20% 0%, #000 0%, transparent 68%);
    mask-image: radial-gradient(120% 90% at 20% 0%, #000 0%, transparent 68%);
    opacity: .5;
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(60% 55% at 82% 12%, var(--amber-soft), transparent 60%),
        radial-gradient(45% 45% at 10% 90%, var(--cyan-soft), transparent 60%);
}
.hero__inner {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .74fr);
    gap: clamp(32px, 5vw, 76px); align-items: center;
}
.hero__content { max-width: 640px; }

#hero-status { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); }
#hero-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ----- Hero telemetry console (signature) ----- */
.tp {
    position: relative; border: 1px solid var(--line); border-radius: var(--r);
    background: linear-gradient(180deg, rgba(22,38,42,.5), rgba(14,26,29,.5));
    backdrop-filter: blur(6px); padding: 20px; overflow: hidden;
    box-shadow: 0 24px 60px -30px rgba(0,0,0,.7);
}
.tp::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, #000, transparent 72%);
    mask-image: radial-gradient(120% 90% at 100% 0%, #000, transparent 72%);
}
.tp > * { position: relative; }
.tp__head { display: flex; align-items: center; gap: 9px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tp__dot { width: 8px; height: 8px; border-radius: 50%; background: #67C68A; box-shadow: 0 0 10px #67C68A; animation: blink 2.4s steps(1) infinite; }
.tp__badge { margin-left: auto; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: #8FD3A6; background: rgba(103,198,138,.12); border: 1px solid rgba(103,198,138,.3); padding: 3px 8px; border-radius: 5px; }

.tp__rows { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; }
.tp__rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(48,71,75,.5); }
.tp__rows > div:last-child { border-bottom: 0; }
.tp__rows dt { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.tp__rows dd { font-family: var(--f-mono); font-size: .8rem; color: var(--paper); text-align: right; }

.tp__scope { border-top: 1px solid var(--line); padding-top: 14px; }
.tp__scopehead { display: flex; justify-content: space-between; margin-bottom: 8px; }
.tp__ok { color: #8FD3A6; }
.tp__spark { width: 100%; height: 46px; display: block; }
.tp__wave { fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(231,169,78,.55)); }
.tp__bars { display: flex; align-items: flex-end; gap: 4px; height: 34px; margin-top: 12px; }
.tp__bars span { flex: 1; height: var(--h); border-radius: 2px; background: linear-gradient(var(--cyan), rgba(111,211,201,.25)); opacity: .85; transform-origin: bottom; }
.tp__bars span:nth-child(3n) { background: linear-gradient(var(--amber), rgba(231,169,78,.25)); }

/* ----- Orchestrated entrance (only pre-hide when JS can restore it) ----- */
.js .hero__content > *, .js .tp { opacity: 0; transform: translateY(18px); }
.hero.in .hero__content > * { animation: heroRise .7s var(--ease) both; }
.hero.in .hero__content > *:nth-child(1) { animation-delay: .05s; }
.hero.in .hero__content > *:nth-child(2) { animation-delay: .12s; }
.hero.in .hero__content > *:nth-child(3) { animation-delay: .19s; }
.hero.in .hero__content > *:nth-child(4) { animation-delay: .26s; }
.hero.in .hero__content > *:nth-child(5) { animation-delay: .33s; }
.hero.in .hero__content > *:nth-child(6) { animation-delay: .40s; }
.hero.in .hero__content > *:nth-child(7) { animation-delay: .47s; }
.hero.in .tp { animation: heroRise .8s var(--ease) .30s both; }
.hero.in .tp__wave { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s var(--ease) .7s forwards; }
.hero.in .tp__bars span { transform: scaleY(0); animation: barGrow .5s var(--ease) both; }
.hero.in .tp__bars span:nth-child(odd) { animation-delay: .9s; }
.hero.in .tp__bars span:nth-child(even) { animation-delay: 1.0s; }
@keyframes heroRise { to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes barGrow { to { transform: scaleY(1); } }

.hero__name {
    font-family: var(--f-display); font-weight: 700;
    font-size: clamp(3rem, 9vw, 6.5rem); line-height: .95; letter-spacing: -.03em;
    margin: 20px 0 0;
}
.hero__tagline { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.15rem, 2.6vw, 1.7rem); color: var(--paper); margin-top: 14px; }
.hero__summary { max-width: 620px; color: var(--muted); font-size: 1.05rem; margin-top: 20px; }

.hero__metrics { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.metric {
    padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: rgba(255,255,255,.015); min-width: 116px;
}
.metric__value { font-family: var(--f-display); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--paper); }
.metric__value b { color: var(--amber); font-weight: inherit; }
.metric__label { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-top: 8px; display: block; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__social { display: flex; gap: 10px; margin-top: 28px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 20px; border-radius: var(--r-sm);
    font-family: var(--f-mono); font-size: .85rem; font-weight: 500; letter-spacing: .01em;
    border: 1px solid transparent; transition: transform .16s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn .ic { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--amber); color: var(--ink); }
.btn--primary:hover { background: #F2BB68; transform: translateY(-2px); }
.btn--ghost { border-color: var(--line-2); color: var(--paper); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-2px); }

/* Icon social buttons */
.iconbtn {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm);
    border: 1px solid var(--line); color: var(--muted);
    transition: color .18s var(--ease), border-color .18s var(--ease), transform .16s var(--ease), background .18s var(--ease);
}
.iconbtn .ic { width: 20px; height: 20px; }
.iconbtn:hover { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); transform: translateY(-2px); }

.hero__scroll {
    position: absolute; left: var(--pad); bottom: 26px; z-index: 1;
    display: inline-flex; align-items: center; gap: 8px; color: var(--faint);
}
.hero__scroll .ic { width: 15px; height: 15px; animation: bob 2s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------- */
.section { padding: clamp(72px, 11vw, 128px) 0; border-top: 1px solid var(--line); position: relative; }
section[id], #top { scroll-margin-top: 80px; }
.section__head { margin-bottom: 52px; max-width: 720px; }
.section__index { display: block; color: var(--amber); margin-bottom: 12px; }
.section__index::before { content: "/ "; }
.section__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.02; letter-spacing: -.025em; }
.section__note { color: var(--muted); margin-top: 16px; font-size: 1rem; }

.subhead { margin: 64px 0 24px; color: var(--faint); }
.subhead::before { content: "// "; }

/* ----- About ----- */
.about { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.about__body p { color: var(--muted); font-size: 1.05rem; }
.about__body p + p { margin-top: 18px; }
.about__body p:first-child { color: var(--paper); font-size: clamp(1.14rem, 1.7vw, 1.28rem); line-height: 1.5; }

/* ID card: portrait + mono spec sheet */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.about__id { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.portrait { position: relative; }
.portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 14%; }
.portrait::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(17,28,31,.92), transparent 32%); }
.portrait figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 9px; padding: 16px 18px; font-family: var(--f-mono); font-size: .82rem; letter-spacing: .02em; color: var(--paper); }
.portrait__dot { width: 7px; height: 7px; border-radius: 50%; background: #67C68A; box-shadow: 0 0 8px #67C68A; flex: none; }

.specs { padding: 6px 18px 16px; }
.specs > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed rgba(48,71,75,.5); }
.specs > div:last-child { border-bottom: 0; }
.specs dt { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.specs dd { font-family: var(--f-mono); font-size: .78rem; color: var(--paper); text-align: right; }

/* Full-width instrument readout of headline stats */
.readout-strip { margin-top: clamp(22px, 3vw, 34px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.readout-strip .cell { background: var(--panel); padding: 24px clamp(18px, 2.4vw, 30px); }
.cell__num { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.9rem, 3vw, 2.4rem); line-height: 1; color: var(--amber); }
.readout-strip .cell:nth-child(even) .cell__num { color: var(--cyan); }
.cell__lbl { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-top: 12px; }

/* ----- Timeline / Experience ----- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 4px; }
.xp {
    position: relative; display: grid; grid-template-columns: 190px 1fr; gap: 28px;
    padding: 26px 0; border-top: 1px solid var(--line);
}
.xp:first-child { border-top: 0; }
.xp__meta { display: flex; flex-direction: column; gap: 10px; }
.xp__period { font-family: var(--f-mono); font-size: .8rem; color: var(--paper); }
.xp__type { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.xp__logo {
    display: inline-grid; place-items: center; height: 44px; min-width: 44px; border-radius: 11px;
    border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--paper);
}
.xp__logo--mono { padding: 0 13px; font-family: var(--f-mono); font-weight: 500; font-size: .82rem; letter-spacing: .1em; color: var(--amber); }
.xp[data-accent="cyan"] .xp__logo--mono { color: var(--cyan); }
.xp__logo .brandmark { width: 24px; height: 24px; }
.xp__logo .ic { width: 20px; height: 20px; }

.xp__role { font-family: var(--f-display); font-weight: 600; font-size: 1.32rem; letter-spacing: -.01em; }
.xp__company { color: var(--amber); font-weight: 500; }
.xp[data-accent="cyan"] .xp__company { color: var(--cyan); }
.xp__summary { color: var(--muted); margin-top: 6px; }
.xp__list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.xp__list li { position: relative; padding-left: 22px; color: var(--muted); font-size: .97rem; }
.xp__list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 1px; background: var(--line-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
    font-family: var(--f-mono); font-size: .74rem; color: var(--muted);
    padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.015);
}

/* ----- Skills / Stack ----- */
.stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skillcat { padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.skillcat__head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.skillcat__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: var(--amber); background: var(--amber-soft); border: 1px solid rgba(231,169,78,.28); }
.skillcat[data-accent="cyan"] .skillcat__icon { color: var(--cyan); background: var(--cyan-soft); border-color: rgba(111,211,201,.28); }
.skillcat__icon .ic { width: 20px; height: 20px; }
.skillcat__title { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; }
.skillcat__list { display: flex; flex-wrap: wrap; gap: 8px; }

/* ----- Projects ----- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.pcard {
    display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r);
    background: var(--panel); overflow: hidden; transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.pcard:hover { transform: translateY(-4px); border-color: var(--line-2); }
.pcard--wide { grid-column: span 2; }

.pcard__cover {
    position: relative; aspect-ratio: 16 / 6; display: flex; align-items: flex-end; justify-content: space-between;
    padding: 18px; overflow: hidden;
    --a: var(--amber);
    background:
        radial-gradient(120% 160% at 88% -20%, color-mix(in srgb, var(--a) 42%, transparent), transparent 60%),
        radial-gradient(90% 120% at 0% 120%, color-mix(in srgb, var(--a) 18%, transparent), transparent 55%),
        linear-gradient(var(--ang, 120deg), #0E1A1D, #12211F);
}
.pcard__cover::before {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(color-mix(in srgb, var(--a) 22%, transparent) 1px, transparent 1px),
                      linear-gradient(90deg, color-mix(in srgb, var(--a) 22%, transparent) 1px, transparent 1px);
    background-size: 26px 26px; opacity: .35;
    -webkit-mask-image: linear-gradient(115deg, #000, transparent 78%);
    mask-image: linear-gradient(115deg, #000, transparent 78%);
}
.pcard__seed { position: relative; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; color: color-mix(in srgb, var(--a) 85%, white 15%); text-transform: uppercase; }
.pcard__year { position: relative; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.pcard__cover .glyph {
    position: absolute; top: -14px; right: 14px; font-family: var(--f-display); font-weight: 700;
    font-size: 5.4rem; line-height: 1; color: color-mix(in srgb, var(--a) 30%, transparent); pointer-events: none;
}

/* Image cover variant (generated project art) */
.pcard__cover--img { aspect-ratio: 16 / 9; padding: 0; background: var(--ink); }
.pcard__cover--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.pcard:hover .pcard__cover--img img { transform: scale(1.035); }
.pcard__cover--img::before {
    background: linear-gradient(to top, rgba(9,15,17,.9) 2%, rgba(9,15,17,.15) 34%, transparent 55%);
    background-size: auto; opacity: 1; -webkit-mask-image: none; mask-image: none;
}
.pcard__cover--img .pcard__seed,
.pcard__cover--img .pcard__year { position: absolute; bottom: 14px; z-index: 2; }
.pcard__cover--img .pcard__seed { left: 16px; }
.pcard__cover--img .pcard__year { right: 16px; }

.pcard__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.pcard__ctx { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--amber); }
.pcard[data-accent="cyan"] .pcard__ctx { color: var(--cyan); }
.pcard__title { font-family: var(--f-display); font-weight: 600; font-size: 1.32rem; letter-spacing: -.01em; margin: 8px 0 10px; }
.pcard__desc { color: var(--muted); font-size: .97rem; flex: 1; }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.pcard .tags { margin-top: 0; }
.pcard__links { display: flex; gap: 14px; }
.plink { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: .8rem; color: var(--paper); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color .18s var(--ease), border-color .18s var(--ease); }
.plink .ic { width: 15px; height: 15px; }
.plink:hover { color: var(--amber); border-color: var(--amber); }

/* ----- Education ----- */
.edu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.educard { padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); border-left: 2px solid var(--amber); }
.educard[data-accent="cyan"] { border-left-color: var(--cyan); }
.educard__period { font-family: var(--f-mono); font-size: .76rem; color: var(--faint); }
.educard__degree { font-family: var(--f-display); font-weight: 600; font-size: 1.28rem; margin: 10px 0 4px; }
.educard__inst { color: var(--paper); }
.educard__loc { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.educard__detail { display: inline-block; margin-top: 14px; font-family: var(--f-mono); font-size: .8rem; color: var(--amber); padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; }
.educard[data-accent="cyan"] .educard__detail { color: var(--cyan); }

.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cert { display: flex; gap: 12px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(255,255,255,.012); }
.cert .ic { width: 18px; height: 18px; color: var(--amber); margin-top: 2px; }
.cert__title { font-size: .95rem; font-weight: 500; line-height: 1.4; }
.cert__issuer { font-family: var(--f-mono); font-size: .72rem; color: var(--faint); margin-top: 4px; }

/* ----- Contact ----- */
.section--contact { background: var(--ink-2); }
.contact { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.channel { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); transition: border-color .18s var(--ease), transform .16s var(--ease); }
.channel[href]:hover { border-color: var(--amber); transform: translateY(-2px); }
.channel__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--amber); background: var(--amber-soft); flex: none; }
.channel[data-accent="cyan"] .channel__icon { color: var(--cyan); background: var(--cyan-soft); }
.channel__label { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.channel__value { font-weight: 500; margin-top: 3px; word-break: break-word; }

.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.copybtn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: var(--r-sm); border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: .85rem; color: var(--paper); transition: border-color .18s var(--ease), color .18s var(--ease); }
.copybtn .ic { width: 1.05em; height: 1.05em; }
.copybtn:hover { border-color: var(--cyan); color: var(--cyan); }
.copybtn.copied { border-color: var(--cyan); color: var(--cyan); }

/* ----- Footer ----- */
.footer { background: var(--ink-2); border-top: 1px solid var(--line); padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer__brand { display: flex; align-items: center; gap: 11px; font-family: var(--f-display); font-weight: 600; }
.footer__tagline { color: var(--faint); flex-basis: 100%; order: 4; }
.footer__social { display: flex; gap: 8px; }
.footer__copy { color: var(--faint); }

/* ----- Back to top ----- */
.to-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 90;
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    background: var(--amber); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.4);
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.to-top .ic { width: 20px; height: 20px; }
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: #F2BB68; }

/* ---------------------------------------------------------------------
   Reveal-on-scroll
   --------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------
   Focus visibility
   --------------------------------------------------------------------- */
a:focus-visible, button:focus-visible, .btn:focus-visible, .iconbtn:focus-visible {
    outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
    .nav__menu {
        position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
        background: rgba(9,15,17,.97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
        padding: 8px var(--pad) 18px; transform: translateY(-120%); transition: transform .3s var(--ease); pointer-events: none;
    }
    .nav__menu.open { transform: translateY(0); pointer-events: auto; }
    .nav__menu a { padding: 14px 4px; font-size: .95rem; border-bottom: 1px solid var(--line); }
    .nav__toggle { display: grid; }

    .hero { min-height: auto; padding: 116px 0 76px; }
    .hero__inner { grid-template-columns: 1fr; gap: 40px; }
    .hero__content { max-width: none; }
    .tp { max-width: 440px; }

    .about { grid-template-columns: 1fr; }
    .about__id { max-width: 420px; }
    .stack, .projects, .edu, .contact { grid-template-columns: 1fr; }
    .pcard--wide { grid-column: auto; }
    .certs { grid-template-columns: 1fr; }

    .xp { grid-template-columns: 1fr; gap: 16px; }
    .xp__meta { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 420px) {
    .hero__metrics .metric { flex: 1 1 100%; }
    .readout-strip { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .reveal { opacity: 1; transform: none; }
    .js .hero__content > *, .js .tp { opacity: 1 !important; transform: none !important; animation: none !important; }
    .tp__wave { stroke-dashoffset: 0 !important; animation: none !important; }
    .tp__bars span { transform: none !important; animation: none !important; }
}
