/* ============================================================
   Aryan Sharma : portfolio
   Palette: deep ink / copper ember. Type: Inter, Newsreader
   italic (editorial voice), JetBrains Mono (the ledger).
   ============================================================ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/Newsreader-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/JetBrainsMono-400.woff2') format('woff2');
}

:root {
  --bg: #0a0c10;
  --surface: #0e1117;
  --line: #1d2330;
  --line-soft: #161b25;
  --text: #edeff3;
  --muted: #99a1b3;
  --faint: #6b7385;
  --accent: #e97d4f;
  --accent-soft: rgba(233, 125, 79, 0.13);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --container: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #14100d; }

a { color: var(--text); text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #14100d;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------ type roles */

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; }

h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.12;
  margin-bottom: 0.6em;
}

.serif,
em.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 420;
  letter-spacing: -0.01em;
}
h1 .serif { color: var(--accent); }
h2 .serif { color: var(--muted); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4em;
}

.mono-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.9em;
}

/* ------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-links a {
  position: relative;
  transition: color 0.18s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-name {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav-dot { color: var(--accent); }

.nav-links { display: flex; gap: 22px; }
.nav-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); }

/* --------------------------------------------------- buttons */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover { border-color: var(--faint); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #14100d;
}
.btn-primary:hover {
  background: #f08e62;
  border-color: #f08e62;
}

.btn-small { padding: 7px 14px; font-size: 0.82rem; }

/* ------------------------------------------------------ hero */

.hero { padding: clamp(64px, 10vh, 120px) 0 0; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.hero-hello {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 1.6em 0 0;
}
.wave {
  display: inline-block;
  transform-origin: 70% 70%;
}
.eyebrow .pin {
  font-size: 0.9em;
  letter-spacing: 0;
  margin-right: 0.2em;
}
@media (prefers-reduced-motion: no-preference) {
  .wave { animation: wave 2.6s ease-in-out 0.8s 2; }
}
@keyframes wave {
  0%, 55%, 100% { transform: rotate(0deg); }
  60% { transform: rotate(14deg); }
  70% { transform: rotate(-8deg); }
  80% { transform: rotate(12deg); }
  90% { transform: rotate(-4deg); }
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 34em;
  margin: 0.5em 0 2em;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-social {
  margin-top: 1.6em;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  display: flex;
  gap: 12px;
}
.hero-social a { color: var(--muted); text-decoration: none; }
.hero-social a:hover { color: var(--accent); }

.hero-portrait { justify-self: end; max-width: 380px; width: 100%; }
.hero-portrait img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  filter: saturate(0.92);
}
.portrait-caption {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--faint);
  margin: 12px 2px 0;
}

/* ------------------------------------- the ledger (signature) */

.ledger { margin: 0; padding: 0; }

.ledger-strip {
  margin-top: clamp(56px, 9vh, 96px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ledger-cell {
  padding: 26px 24px 24px 0;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.ledger-cell:first-child { border-left: none; padding-left: 0; }

.ledger-cell dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.ledger-cell dd {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.ledger-cell p {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* -------------------------------------------------- sections */

.section { padding: clamp(72px, 12vh, 130px) 0 0; }

.section-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
}

.section-head .eyebrow {
  position: sticky;
  top: 88px;
}

.section-intro {
  color: var(--muted);
  max-width: 40em;
  margin: 0 0 2.4em;
}

.prose p {
  color: var(--muted);
  max-width: 42em;
  margin: 0 0 1.2em;
}
.prose p:last-child { margin-bottom: 0; }

.now-line, .edu-line {
  margin-top: 2.6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 46em;
}
.now-line .mono-label, .edu-line .mono-label { margin-bottom: 0.5em; }

/* ------------------------------------------------- experience */

.role { margin-top: 3em; }
.role:first-of-type { margin-top: 2.2em; }

.role-head h3 {
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
}
.brand-mark {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}
.role-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin: 6px 0 0;
}
.role-summary {
  color: var(--muted);
  max-width: 44em;
  margin: 1em 0 0;
}

.role-cases {
  list-style: none;
  margin: 1.6em 0 0;
  padding: 0;
}
.role-cases li {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.role-cases li:last-child { border-bottom: 1px solid var(--line-soft); }

.case-metric {
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  padding-top: 2px;
}
.case-text { color: var(--muted); font-size: 0.95rem; }

/* --------------------------------------------------- builds */

.builds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.build {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.build:hover {
  border-color: #2c3445;
  transform: translateY(-2px);
}

.build h3 {
  font-size: 1.08rem;
  letter-spacing: -0.015em;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.build-title {
  color: var(--text);
  text-decoration: none;
}
.build-title::after {
  content: "";
  position: absolute;
  inset: 0;
}
.build-launch {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--faint);
  transition: color 0.18s ease, transform 0.18s ease;
  flex-shrink: 0;
}
.build-live { position: relative; }
.build-live:hover { border-color: var(--accent); }
.build-live:hover .build-launch { color: var(--accent); transform: translate(2px, -2px); }
.build-live:hover .build-title { color: var(--accent); }
.build-live:focus-within { border-color: var(--accent); }

.build-rows { margin: 0; display: grid; gap: 12px; }
.build-rows dt {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}
.build-rows dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.build-stack {
  list-style: none;
  margin: auto 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.build-stack li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}

/* ----------------------------------------------------- wins */

.wins-list { list-style: none; margin-top: 2.2em; }

.win {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.win:last-child { border-bottom: 1px solid var(--line); }

.win-metric {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

.win-body h3 { font-size: 1.05rem; margin-bottom: 0.45em; }
.win-body p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 46em; }

/* --------------------------------------------------- system */

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 2.2em;
}

.stack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack-list li {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
}

.loop-list {
  margin: 0;
  padding: 0 0 0 1.4em;
  color: var(--muted);
  font-size: 0.92rem;
  display: grid;
  gap: 10px;
}
.loop-list li::marker {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
}

.principles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: 1.05rem;
  color: var(--text);
}
.principles-list li {
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}

.skills { margin-top: 4em; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.skill-group h4 {
  margin: 0 0 0.6em;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.skill-group p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ----------------------------------------------- endorsement */

.quote {
  margin: 0;
  position: relative;
  padding-top: 0.2em;
}
.quote::before {
  content: "\201C";
  position: absolute;
  top: -0.32em;
  left: -0.06em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.5;
  pointer-events: none;
}
.quote blockquote {
  margin: 0;
}
.quote blockquote p {
  margin: 0;
  font-size: clamp(1.25rem, 2.3vw, 1.65rem);
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--muted);
  max-width: 26em;
}
.quote-lift {
  color: var(--text);
}
.quote-by {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2em;
  padding-top: 1.6em;
  border-top: 1px solid var(--line-soft);
  max-width: 40em;
}
.quote-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.quote-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}
.quote-meta strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.quote-meta span {
  font-size: 0.82rem;
  color: var(--faint);
}
.quote-source {
  margin-left: auto;
  align-self: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.quote-source:hover { color: var(--accent); }

/* ---------------------------------------------------- notes */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 2.2em;
}

.note {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.note h3 {
  font-size: 1.22rem;
  font-weight: 460;
  line-height: 1.3;
  margin-bottom: 0.7em;
}
.note p:last-child {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.notes-cta {
  margin-top: 3em;
  font-size: 0.92rem;
  color: var(--faint);
}
.notes-cta a { color: var(--muted); }

/* -------------------------------------------------- contact */

.section-contact {
  padding-bottom: clamp(72px, 12vh, 130px);
  text-align: left;
}

.contact-headline {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  max-width: 22em;
}

.contact-sub {
  color: var(--muted);
  max-width: 38em;
  margin: 1.4em 0 2em;
}

.contact-links {
  list-style: none;
  margin: 2em 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.contact-links a { color: var(--muted); text-decoration: none; }
.contact-links a:hover { color: var(--accent); }

/* --------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}

/* -------------------------------------------------- motion */

/* Scroll reveals: soft rise, eased, with optional per-item stagger (--d). */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Hero entrance: a single orchestrated load sequence. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .hero-portrait,
  .ledger-cell {
    opacity: 0;
    animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero-copy .eyebrow   { animation-delay: 0.06s; }
  .hero-copy h1         { animation-delay: 0.14s; }
  .hero-hello           { animation-delay: 0.30s; }
  .hero-sub             { animation-delay: 0.40s; }
  .hero-actions         { animation-delay: 0.50s; }
  .hero-social          { animation-delay: 0.60s; }
  .hero-portrait        { animation-delay: 0.24s; }
  .ledger-cell:nth-child(1) { animation-delay: 0.66s; }
  .ledger-cell:nth-child(2) { animation-delay: 0.74s; }
  .ledger-cell:nth-child(3) { animation-delay: 0.82s; }
  .ledger-cell:nth-child(4) { animation-delay: 0.90s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .build, .btn, .nav { transition: none; }
  .wave { animation: none; }
}

/* ----------------------------------------------- responsive */

@media (max-width: 920px) {
  .section-grid { grid-template-columns: 1fr; gap: 8px; }
  .section-head .eyebrow { position: static; }
  .system-grid, .skills-grid, .notes-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { justify-self: start; max-width: 320px; order: -1; }

  .ledger-strip { grid-template-columns: 1fr 1fr; }
  .ledger-cell { padding: 20px 16px 18px 0; }
  .ledger-cell:nth-child(odd) { border-left: none; padding-left: 0; }
  .ledger-cell:nth-child(even) { padding-left: 16px; }
  .ledger-cell:nth-child(n+3) { border-top: 1px solid var(--line-soft); }

  .builds-grid { grid-template-columns: 1fr; }
  .system-grid, .skills-grid, .notes-grid { grid-template-columns: 1fr; gap: 28px; }

  .role-cases li { grid-template-columns: 1fr; gap: 4px; }
  .win { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }

  .quote-by { flex-wrap: wrap; align-items: flex-start; }
  .quote-source { margin-left: 56px; margin-top: 6px; }

  .nav-links { display: none; }
}
