/* =========================================================
   Akash — Portfolio styles (minimal)
   Layout: one calm column, 1120px max, large 2-up project tiles, generous whitespace.
   To change the look, edit the tokens in :root first.
   ========================================================= */

:root {
  --bg: #ffffff;
  --surface: #f4f5f7;
  --ink: #1b1c1f;
  --muted: #6c6f76;
  --line: #e4e6ea;
  --accent: #1f5fd1;

  /* soft tints behind project images (shown until a screenshot is added) */
  --tint-1: #e9eef8;
  --tint-2: #e8f2ee;
  --tint-3: #f3efe6;
  --tint-4: #f2eaee;
  --tint-5: #ece9f5;
  --tint-6: #e9eef0;

  --sans: "Geist", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;

  --max: 1120px;
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0e;
    --surface: #17181b;
    --ink: #f2f3f5;
    --muted: #9a9ca3;
    --line: #26282c;
    --accent: #6ea4ff;
    --tint-1: #161c27;
    --tint-2: #142019;
    --tint-3: #221e16;
    --tint-4: #23181d;
    --tint-5: #1b1827;
    --tint-6: #161d20;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0e;
  --surface: #17181b;
  --ink: #f2f3f5;
  --muted: #9a9ca3;
  --line: #26282c;
  --accent: #6ea4ff;
  --tint-1: #161c27;
  --tint-2: #142019;
  --tint-3: #221e16;
  --tint-4: #23181d;
  --tint-5: #1b1827;
  --tint-6: #161d20;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
@media (min-width: 760px) {
  .wrap {
    padding-left: max(40px, env(safe-area-inset-left, 0px));
    padding-right: max(40px, env(safe-area-inset-right, 0px));
  }
}

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
}
.logo { font-weight: 600; font-size: 1rem; text-decoration: none; letter-spacing: -0.01em; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.nav ul a { text-decoration: none; font-size: 0.9rem; color: var(--muted); transition: color 0.2s; }
.nav ul a:hover { color: var(--ink); }
@media (max-width: 480px) { .nav ul { gap: 18px; } }

/* ---------- Links & buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  font: 500 0.95rem/1 var(--sans);
  text-decoration: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { border-color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.solid:hover { opacity: 0.88; }
.arrow-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.arrow-link::after { content: " →"; transition: margin 0.2s; }
.arrow-link:hover::after { margin-left: 4px; }

/* ---------- Hero ---------- */
.hero .wrap {
  padding-block: clamp(72px, 14vw, 160px) clamp(64px, 10vw, 120px);
  display: grid;
  gap: 28px;
  justify-items: start;
}
.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 5.2rem);
  max-width: 13em;
}
.hero h1 .soft { color: var(--muted); }
.hero p.sub {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 30em;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

/* ---------- Sections ---------- */
section.block > .wrap { padding-block: clamp(64px, 10vw, 128px); display: grid; gap: clamp(36px, 5vw, 56px); }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-title h2 { font-size: clamp(2rem, 4.4vw, 3rem); }

/* ---------- Work grid ---------- */
.work {
  display: grid;
  gap: clamp(40px, 5vw, 56px) 28px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}
.tile { display: grid; gap: 18px; text-decoration: none; min-width: 0; }
.tile .media {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint, var(--surface));
}
.tile .media::before {
  /* placeholder mark — shows until a screenshot is added */
  content: attr(data-mark);
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: color-mix(in srgb, var(--ink) 22%, transparent);
}
.tile .media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.tile:hover .media img { transform: scale(1.03); }
.tile .meta { display: grid; gap: 6px; padding-inline: 4px; }
.tile .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tile h3 { font-size: 1.35rem; letter-spacing: -0.015em; }
.tile .tag { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.tile .tag.live { color: var(--accent); }
.tile .tag.live::before { content: "● "; }
.tile p { color: var(--muted); font-size: 1rem; }
.tile:hover h3 { color: var(--accent); }
.tile h3 { transition: color 0.2s; }

.t1 { --tint: var(--tint-1); }
.t2 { --tint: var(--tint-2); }
.t3 { --tint: var(--tint-3); }
.t4 { --tint: var(--tint-4); }
.t5 { --tint: var(--tint-5); }
.t6 { --tint: var(--tint-6); }

/* ---------- About ---------- */
.about {
  display: grid;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
@media (min-width: 860px) { .about { grid-template-columns: 380px minmax(0, 1fr); } }

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
}
.portrait .ph svg { width: 56px; height: 56px; }
.portrait .ph span { font-family: var(--mono); font-size: 0.72rem; }

.about-text { display: grid; gap: 40px; min-width: 0; }
.about-text .intro { display: grid; gap: 16px; max-width: 34em; }
.about-text .intro p:first-child { font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.4; letter-spacing: -0.015em; }
.about-text .intro p + p { color: var(--muted); }

.list { display: grid; border-top: 1px solid var(--line); }
.list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.list b { font-weight: 500; }
.list span { color: var(--muted); }
.list time { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; grid-row: span 2; padding-top: 3px; }
@media (max-width: 520px) { .list div { grid-template-columns: 1fr; } .list time { grid-row: auto; order: -1; } }

.skills-line { color: var(--muted); font-size: 0.97rem; max-width: 40em; }
.skills-line b { color: var(--ink); font-weight: 500; }

/* ---------- Contact ---------- */
.contact .wrap { display: grid; gap: 28px; justify-items: start; }
.contact h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.contact p { color: var(--muted); max-width: 30em; font-size: 1.1rem; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.email { font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-weight: 500; user-select: all; overflow-wrap: anywhere; }
.socials { display: flex; flex-wrap: wrap; gap: 24px; }

footer .wrap {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

[hidden] { display: none !important; }

/* ---------- Homepage doors (Case studies / Projects) ---------- */
.doors {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}
.door {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(28px, 4.5vw, 48px);
  min-height: clamp(300px, 34vw, 400px);
  border-radius: 28px;
  background: var(--tint, var(--surface));
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
}
.door:hover { transform: translateY(-4px); }
.door-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.door-top svg { width: 44px; height: 44px; color: color-mix(in srgb, var(--ink) 45%, transparent); }
.door h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); max-width: 11em; margin-top: auto; padding-top: clamp(24px, 5vw, 64px); }
.door p { color: var(--muted); max-width: 26em; }
.door-go {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  margin-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  font-weight: 500;
}
.door-go span:last-child { font-size: 1.3rem; transition: transform 0.25s; }
.door:hover .door-go span:last-child { transform: translateX(4px); }
/* "Coming soon" pill on the Projects tile, same terminal green as the Projects page cursor */
.door-go .soon { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; font-size: 0.9rem; border: 1px solid color-mix(in srgb, #22a55b 45%, transparent); border-radius: 999px; background: color-mix(in srgb, #22a55b 10%, transparent); }
.door-go .pulse { width: 8px; height: 8px; border-radius: 50%; background: #22a55b; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, #22a55b 60%, transparent); } to { box-shadow: 0 0 0 8px transparent; } }

/* ---------- List pages ---------- */
.page-head .wrap { padding-block: clamp(56px, 10vw, 112px) clamp(24px, 4vw, 40px); display: grid; gap: 18px; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.page-head p.sub { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--muted); max-width: 32em; }
.page-head .crumbs { display: flex; gap: 20px; flex-wrap: wrap; }
.page-head .crumbs a { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.page-head .crumbs a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.list-section .wrap { padding-block: clamp(24px, 4vw, 40px) clamp(72px, 10vw, 128px); }
.empty { color: var(--muted); padding: 48px 0; }
/* Empty Projects list: looks like a database query that came back empty */
.empty.query { grid-column: 1 / -1; max-width: 44em; padding: 0; font-family: var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.empty.query .bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 0.8rem; }
.empty.query .dots { display: flex; gap: 6px; }
.empty.query .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); opacity: 0.4; }
.empty.query p { margin: 0; padding: 20px; font-size: clamp(0.95rem, 2.2vw, 1.15rem); line-height: 1.7; }
.empty.query .cmd { display: block; color: var(--ink); }
.empty.query .cursor { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 6px; vertical-align: text-bottom; background: #22a55b; /* terminal green: a deliberate exception to the token rule */ animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tile h3 a { text-decoration: none; }
.tile .actions { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 4px; }
.actions:not(:has(a)) { display: none; }

/* ---------- Group intro (Products / Case studies) ---------- */
.group-head { display: grid; gap: 12px; max-width: 36em; }
.group-head h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.group-head p { color: var(--muted); font-size: 1.05rem; }


/* ---------- Case study rows ---------- */
.cases { display: grid; gap: clamp(40px, 6vw, 64px); }
.case {
  display: grid;
  gap: 20px 48px;
  align-items: center;
}
@media (min-width: 820px) { .case { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.case .media {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint, var(--surface));
}
.case .media::before {
  content: attr(data-mark);
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: color-mix(in srgb, var(--ink) 22%, transparent);
}
.case .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.case .media:hover img { transform: scale(1.03); }
.case .body { display: grid; gap: 14px; min-width: 0; justify-items: start; }
.case h3 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); letter-spacing: -0.02em; }
.case h3 a { text-decoration: none; transition: color 0.2s; }
.case h3 a:hover { color: var(--accent); }
.finding { color: var(--muted); max-width: 32em; }
.finding b { color: var(--ink); font-weight: 500; }
.artefact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 999px;
}
.artefact svg { width: 14px; height: 14px; flex: none; }
.case .actions { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 4px; }
.ext::after { content: " ↗"; }
.muted-note { font-size: 0.9rem; color: var(--muted); }

/* artefact box on case study pages */
.artefact-box {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 32px);
  background: var(--surface);
  border-radius: var(--radius);
}
@media (min-width: 640px) { .artefact-box { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.artefact-box h3 { font-size: 1.25rem; }
.artefact-box p { margin-top: 6px; }

/* ---------- Case study page ---------- */
.study-head .wrap { padding-block: clamp(56px, 10vw, 112px) 40px; display: grid; gap: 24px; max-width: 860px; }
.study-head h1 { font-size: clamp(2.4rem, 6.4vw, 4.4rem); }
.study-head p.sub { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 32em; }
.study-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; padding-top: 16px; }
.study-facts dt { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.study-facts dd { margin: 4px 0 0; }
.study-hero { padding-bottom: 24px; }
.study-hero .media {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint, var(--surface));
}
.study-hero .media::before {
  content: attr(data-mark);
  position: absolute; inset: 0;
  display: grid; place-content: center;
  font-size: 1rem; font-family: var(--mono);
  color: var(--muted);
}
.study-hero .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.study-body .wrap { max-width: 760px; display: grid; gap: clamp(48px, 7vw, 72px); padding-block: clamp(48px, 8vw, 96px); }
.study-body section { display: grid; gap: 16px; }
.study-body h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.study-body p, .study-body li { color: var(--muted); }
.study-body strong { color: var(--ink); font-weight: 500; }
.study-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.pull { font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.35; letter-spacing: -0.015em; color: var(--ink) !important; }
.code-scroll {
  overflow-x: auto;
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.75;
  white-space: pre;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile .media img, .btn, .tile h3 { transition: none; }
  .tile:hover .media img { transform: none; }
  .empty.query .cursor, .door-go .pulse { animation: none; }
}
