/* ═══════════════════════════════════════════════════════════
   Shyam Arora — warm, modern, sans-forward portfolio
   Soft warm-white · bold grotesk · single clay accent · light + dark
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ───────────────────────────────────────────────── */
:root {
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --sans:    'Hanken Grotesk', -apple-system, system-ui, sans-serif;
  --mono:    'Spline Sans Mono', ui-monospace, monospace;
  --ease:    cubic-bezier(.22,1,.36,1);
}

html[data-theme="light"] {
  --paper:   #f4f2ec;   /* soft warm white          */
  --paper-2: #eae7dd;   /* recessed                 */
  --card:    #fbfaf6;   /* raised cards             */
  --ink:     #1a1813;   /* near-black warm          */
  --ink-2:   #5a564c;   /* muted                    */
  --ink-3:   #918c7e;   /* faint                    */
  --rule:    #dedacc;   /* hairline                 */
  --rule-2:  #cbc6b4;
  --accent:  #c8442a;   /* clay red                 */
  --accent-h:#a4321d;
  --accent-w:rgba(200,68,42,.09);
}

html[data-theme="dark"] {
  --paper:   #14130f;   /* warm charcoal            */
  --paper-2: #1c1a14;
  --card:    #1f1d16;
  --ink:     #f0ede3;   /* warm white               */
  --ink-2:   #a59f8e;
  --ink-3:   #6c6757;
  --rule:    #2d2a20;
  --rule-2:  #423d2f;
  --accent:  #f26b47;   /* warmed clay              */
  --accent-h:#ff8767;
  --accent-w:rgba(242,107,71,.12);
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.ready { transition: background .5s var(--ease), color .5s var(--ease); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; color: inherit; background: none; border: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ── LAYOUT ───────────────────────────────────────────────── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 2.5rem; }
.section { padding: 7rem 0; }
.section + .section, #about { border-top: 1px solid var(--rule); }

.index {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.5rem;
}
.h-section {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.h-section em { font-style: normal; color: var(--accent); }
.lede { color: var(--ink-2); font-size: 1.1rem; max-width: 54ch; line-height: 1.6; }

/* ── NAV ──────────────────────────────────────────────────── */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 2.5rem;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s, padding .3s;
}
#nav.scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--rule);
  padding-top: .8rem;
  padding-bottom: .8rem;
}
.nav-name { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -.03em; }
.nav-name .dot { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 1.9rem; }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-2);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 3px;
  transition: color .25s, background-size .3s var(--ease);
}
.nav-links a:hover { color: var(--ink); background-size: 100% 2px; }

.theme-toggle {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--rule-2);
  border-radius: 50%;
  color: var(--ink-2);
  transition: color .25s, border-color .25s, transform .4s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(25deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--ink-2); border-radius: 2px; transition: transform .25s, opacity .25s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 95;
  background: var(--paper);
  flex-direction: column; justify-content: center; gap: .25rem;
  padding: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--display); font-weight: 700;
  font-size: 2.2rem; letter-spacing: -.03em;
  color: var(--ink); padding: .35rem 0;
}
.mobile-menu a em { font-style: normal; color: var(--accent); }

/* ── HERO ─────────────────────────────────────────────────── */
#hero { min-height: 100svh; display: flex; align-items: center; padding: 9rem 0 5rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 4.5rem; align-items: center; width: 100%; }
.eyebrow {
  font-family: var(--mono);
  font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 1.75rem;
  display: flex; align-items: center; gap: .6rem;
}
.eyebrow .mark { width: 24px; height: 1px; background: var(--accent); display: inline-block; }
.hero-statement {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.9rem, 7vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.045em;
  margin-bottom: 1.9rem;
  text-wrap: balance;
}
.hero-statement em {
  font-style: normal;
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 5px;
  background-position: 0 102%;
  background-repeat: no-repeat;
}
.hero-sub { color: var(--ink-2); font-size: 1.15rem; line-height: 1.6; max-width: 46ch; margin-bottom: 2.5rem; }
.hero-actions { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.btn-ink {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: .92rem;
  padding: .85rem 1.6rem; border-radius: 8px;
  transition: background .25s, transform .25s var(--ease);
}
.btn-ink:hover { background: var(--accent-h); transform: translateY(-2px); }
.btn-ink svg { width: 15px; height: 15px; }
.txtlink {
  font-size: .92rem; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: .4rem;
  transition: color .25s;
}
.txtlink svg { width: 13px; height: 13px; opacity: .6; }
.txtlink:hover { color: var(--accent); }

/* portrait */
.portrait {
  position: relative; aspect-ratio: 4 / 5;
  border: 1px solid var(--rule-2); border-radius: 14px;
  background: radial-gradient(130% 90% at 50% 0%, var(--accent-w), transparent 60%), var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
.portrait .mono-init { font-family: var(--display); font-weight: 800; font-size: 4.5rem; letter-spacing: -.05em; color: var(--accent); line-height: 1; }
.portrait figcaption { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 1rem; }
.portrait .tape { display: none; }
.hero-meta { margin-top: 1.4rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: center; line-height: 1.9; }

/* ── ABOUT ────────────────────────────────────────────────── */
.about-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4.5rem; align-items: start; }
.about-prose p { color: var(--ink-2); font-size: 1.05rem; line-height: 1.72; margin-bottom: 1.2rem; max-width: 50ch; }
.about-prose p:last-of-type { margin-bottom: 0; }
.about-prose strong { color: var(--ink); font-weight: 600; }
.about-prose .lead { font-size: 1.32rem; line-height: 1.5; color: var(--ink); font-weight: 500; letter-spacing: -.01em; }
.about-edu {
  font-family: var(--mono) !important; font-size: .76rem !important;
  letter-spacing: .03em; color: var(--ink-3) !important;
  margin-top: 1.75rem !important; padding-top: 1.25rem; border-top: 1px solid var(--rule);
}
.stats { display: flex; gap: 2.75rem; margin-top: 2.5rem; flex-wrap: wrap; }
.stat-fig { display: flex; flex-direction: column; }
.stat-fig b { font-family: var(--display); font-weight: 800; font-size: 2.7rem; line-height: 1; letter-spacing: -.04em; }
.stat-fig b span { color: var(--accent); }
.stat-fig small { font-size: .8rem; color: var(--ink-2); margin-top: .45rem; font-weight: 500; }

.skills { display: flex; flex-direction: column; }
.skill-row { display: grid; grid-template-columns: 96px 1fr; gap: 1.25rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.skill-row:first-child { border-top: 0; padding-top: 0; }
.skill-row dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.skill-row dd { color: var(--ink); font-size: .95rem; line-height: 1.65; font-weight: 500; }
.skill-row dd span { color: var(--ink-3); font-weight: 400; }

/* ── EXPERIENCE ───────────────────────────────────────────── */
.ledger { margin-top: .5rem; }
.role { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.role:last-child { border-bottom: 1px solid var(--rule); }
.role-years { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .7rem; }
.role-years br { display: none; }
.role-title { font-family: var(--display); font-weight: 700; font-size: 1.65rem; line-height: 1.1; letter-spacing: -.025em; }
.role-co { font-size: .95rem; color: var(--accent); font-weight: 600; margin-top: .3rem; margin-bottom: 1.2rem; }
.role-co span { color: var(--ink-3); font-weight: 400; }
.role-bullets { display: flex; flex-direction: column; gap: .55rem; max-width: 70ch; }
.role-bullets li { color: var(--ink-2); font-size: .96rem; line-height: 1.6; padding-left: 1.4rem; position: relative; }
.role-bullets li::before { content: ''; position: absolute; left: 0; top: .65em; width: 8px; height: 2px; background: var(--accent); }
.role-bullets strong { color: var(--ink); font-weight: 600; }
.role-tech { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.role-tech span { font-family: var(--mono); font-size: .69rem; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: .22rem .65rem; }

/* ── WORK ─────────────────────────────────────────────────── */
.catalog { margin-top: .5rem; }
.work {
  display: grid; grid-template-columns: 2.5rem 1fr auto; gap: 2rem;
  padding: 2.5rem 0; border-top: 1px solid var(--rule); align-items: start;
}
.work:last-of-type { border-bottom: 1px solid var(--rule); }
.work-no { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); padding-top: .5rem; }
.work-cat { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .55rem; }
.work-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.08; letter-spacing: -.025em; margin-bottom: .75rem; }
.work-desc { color: var(--ink-2); font-size: .98rem; line-height: 1.65; max-width: 58ch; margin-bottom: 1.1rem; }
.work-tech { display: flex; flex-wrap: wrap; gap: .45rem; }
.work-tech span { font-family: var(--mono); font-size: .69rem; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: .22rem .65rem; }
.work-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 1rem; min-width: 120px; }
.stamp {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
  padding: .28rem .7rem; white-space: nowrap;
}
.stamp.muted { color: var(--ink-3); border-color: var(--rule-2); }
.work-link { font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; color: var(--ink-2); display: inline-flex; align-items: center; gap: .4rem; transition: color .25s; }
.work-link svg { width: 13px; height: 13px; }
.work-link:hover { color: var(--accent); }

.more-head { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 4rem 0 1.75rem; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.more-item { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 1.6rem; transition: border-color .25s, transform .25s var(--ease); }
.more-item:hover { border-color: var(--rule-2); transform: translateY(-2px); }
.more-cat { font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
.more-name { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; margin-bottom: .5rem; }
.more-desc { color: var(--ink-2); font-size: .9rem; line-height: 1.6; margin-bottom: .7rem; }
.more-tech { font-family: var(--mono); font-size: .68rem; color: var(--ink-3); letter-spacing: .02em; }

/* ── CONTACT ──────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: end; }
.contact-head { font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: .98; letter-spacing: -.04em; margin-bottom: 1.75rem; text-wrap: balance; }
.contact-head em { font-style: normal; color: var(--accent); }
.contact-email {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem); letter-spacing: -.03em;
  color: var(--accent); display: inline-block;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 3px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 4px; transition: background-size .35s var(--ease), color .25s;
}
.contact-email:hover { color: var(--accent-h); background-size: 0% 3px; }
.contact-note { color: var(--ink-2); font-size: 1rem; line-height: 1.65; max-width: 40ch; margin-top: 1.5rem; }
.signature { display: none; }
.contact-socials { display: flex; flex-direction: column; gap: .95rem; }
.contact-socials a { font-family: var(--mono); font-size: .78rem; letter-spacing: .03em; color: var(--ink-2); display: inline-flex; align-items: center; gap: .6rem; transition: color .25s; }
.contact-socials a svg { width: 15px; height: 15px; }
.contact-socials a:hover { color: var(--accent); }

/* ── FOOTER ───────────────────────────────────────────────── */
footer { border-top: 1px solid var(--rule); }
.foot-inner { display: flex; justify-content: space-between; align-items: center; padding: 2rem 0; flex-wrap: wrap; gap: 1rem; }
.foot-inner p { font-family: var(--mono); font-size: .7rem; letter-spacing: .03em; color: var(--ink-3); }
.foot-inner a { color: var(--ink-2); transition: color .25s; }
.foot-inner a:hover { color: var(--accent); }

/* ── REVEAL ───────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  body.ready .an   { animation: rise .7s var(--ease) both; }
  body.ready .an-1 { animation-delay: .05s; }
  body.ready .an-2 { animation-delay: .13s; }
  body.ready .an-3 { animation-delay: .22s; }
  body.ready .an-4 { animation-delay: .32s; }
  body.ready .an-5 { animation-delay: .42s; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .portrait { max-width: 260px; }
  .about-body { grid-template-columns: 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .work { grid-template-columns: 2rem 1fr; }
  .work-aside { grid-column: 2; flex-direction: row; align-items: center; min-width: 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 1.5rem; }
  .section { padding: 5rem 0; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .more-grid { grid-template-columns: 1fr; }
  .stats { gap: 2rem; }
  .work { grid-template-columns: 1fr; gap: .4rem; }
  .work-no { display: none; }
}
