/* Arshdeep Sahota portfolio: one layout, two themes (Standard and Sunset Mirai) driven by CSS variables. */

:root,
[data-theme="standard"] {
  --bg: #f6f4f1;
  --bg-2: #efebe6;
  --surface: #ffffff;
  --surface-border: #e6e1da;
  --ink: #17161b;
  --muted: #5e5a66;
  --accent: #c2183a;
  --accent-2: #8f1029;
  --on-accent: #ffffff;
  --glow: none;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 16, 24, .05), 0 8px 24px rgba(20, 16, 24, .06);
  --font-body: "Inter", system-ui, sans-serif;
  --font-head: "Space Grotesk", "Inter", sans-serif;
  --nav-bg: rgba(246, 244, 241, .82);
  --blur: none;
  color-scheme: light;
}

[data-theme="mirai"] {
  --bg: #0e0b1f;
  --bg-2: #160f2c;
  --surface: rgba(255, 255, 255, .06);
  --surface-border: rgba(255, 214, 232, .14);
  --ink: #fbf1f6;
  --muted: #cdb9d8;
  --accent: #ff6f91;
  --accent-2: #ffc46b;
  --on-accent: #1a0b1c;
  --glow: 0 0 24px rgba(255, 111, 145, .35);
  --radius: 22px;
  --shadow: 0 10px 40px rgba(5, 0, 20, .45);
  --font-body: "Zen Kaku Gothic New", "Inter", sans-serif;
  --font-head: "Fredoka", "Space Grotesk", sans-serif;
  --nav-bg: rgba(18, 12, 38, .55);
  --blur: blur(14px) saturate(140%);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 16px/1.65 var(--font-body);
  color: var(--ink);
  background: var(--bg);
  transition: background-color .5s, color .5s;
  overflow-x: hidden;
}
[data-theme="mirai"] body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 111, 145, .28), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(122, 76, 255, .22), transparent 60%),
    linear-gradient(180deg, #0e0b1f 0%, #1b1036 45%, #3a1638 75%, #5a2032 100%) fixed;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* floating particles (Sunset Mirai only), animated by site.js */
#sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; display: none; }
[data-theme="mirai"] #sky { display: block; }
.spark {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 235, .95), rgba(255, 111, 145, .35) 45%, transparent 70%);
}
main, .nav, .footer, .mobile-menu { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: var(--nav-bg);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--surface-border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font: 700 14px var(--font-head); box-shadow: var(--glow);
}
.brand-name { font-family: var(--font-head); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: 8px; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--bg-2); }
[data-theme="mirai"] .nav-links a:hover, [data-theme="mirai"] .nav-links a.active { background: rgba(255, 255, 255, .08); }
.nav-tools { display: flex; gap: 8px; align-items: center; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 10px;
  border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface);
  color: var(--ink); font: 600 13px var(--font-body); cursor: pointer; backdrop-filter: var(--blur);
}
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: var(--glow); }
.theme-label { display: none; }
[data-theme="standard"] .theme-label[data-for="standard"], [data-theme="mirai"] .theme-label[data-for="mirai"] { display: inline; }
.menu-toggle { display: none; }
.mobile-menu {
  display: flex; flex-direction: column; padding: 8px 16px 16px; gap: 2px;
  background: var(--nav-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--surface-border);
  position: sticky; top: 64px; z-index: 19;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 10px 6px; color: var(--ink); text-decoration: none; font-weight: 600; }

/* ---------------------------------------------------------------- layout */
main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.section { padding: 72px 0 24px; }
.section-title { font-size: clamp(28px, 4vw, 40px); display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; }
.section-title .num { font: 600 14px var(--font-body); color: var(--accent); letter-spacing: .1em; }
.section-lead { color: var(--muted); margin: -12px 0 28px; max-width: 640px; }
.kicker { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.card {
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; backdrop-filter: var(--blur);
}

/* ---------------------------------------------------------------- hero */
.hero {
  min-height: calc(100vh - 64px); display: grid; grid-template-columns: 1.3fr 1fr;
  align-items: center; gap: clamp(24px, 5vw, 64px); padding: 48px 0;
}
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .06em; margin: 0 0 12px; }
.hero-name { font-size: clamp(52px, 9vw, 104px); letter-spacing: -.02em; }
.hero-name .line { display: inline-block; }
/* solid colour: anime.js splitText wraps each letter, which breaks background-clip gradients */
[data-theme="mirai"] .hero-name {
  color: #ffe3ea;
  text-shadow: 0 0 28px rgba(255, 111, 145, .45), 0 4px 18px rgba(255, 111, 145, .25);
}
.hero-role { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 560px; margin: 18px 0 28px; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 12px;
  font-weight: 600; text-decoration: none; color: var(--ink); background: var(--surface);
  border: 1px solid var(--surface-border); backdrop-filter: var(--blur);
  transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: var(--glow); }
.btn.ghost { background: transparent; }
.hero-facts { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font: 700 22px var(--font-head); }
.hero-facts span { font-size: 13px; color: var(--muted); }
.hero-photo { margin: 0; position: relative; justify-self: center; width: min(400px, 80vw); aspect-ratio: 1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.hero-photo::before {
  content: ""; position: absolute; inset: -14px; border-radius: 36px; z-index: -1;
  background: linear-gradient(140deg, var(--accent), transparent 60%); opacity: .25;
}
.photo-mirai { display: none; }
[data-theme="mirai"] .photo-standard { display: none; }
[data-theme="mirai"] .photo-mirai { display: block; border-radius: 50%; object-position: 50% 60%; box-shadow: 0 0 60px rgba(255, 111, 145, .45); }
[data-theme="mirai"] .hero-photo::before { border-radius: 50%; inset: -18px; opacity: .5; background: conic-gradient(from 200deg, var(--accent), var(--accent-2), transparent 55%, var(--accent)); filter: blur(8px); }

/* ---------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.about-text p { margin: 0 0 14px; }
.about-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mini { padding: 16px 18px; color: var(--muted); }
.mini-title { display: block; color: var(--ink); font: 700 15px var(--font-head); margin-bottom: 2px; }

/* ---------------------------------------------------------------- experience */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 2px solid var(--surface-border); }
.job { position: relative; padding: 0 0 30px 6px; }
.job::before {
  content: ""; position: absolute; left: -35px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: var(--glow);
}
.job:first-child::before { background: var(--accent); }
.job-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.job h3 { font-size: 20px; }
.job-where { color: var(--muted); font-size: 14px; }
.job ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.job li { margin: 3px 0; }

/* ---------------------------------------------------------------- projects */
.feature {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px; backdrop-filter: var(--blur);
}
.feature h3 { font-size: 26px; margin-bottom: 10px; }
.feature p { margin: 0 0 12px; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0 0 16px; }
.ticks li { position: relative; padding-left: 22px; margin: 6px 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.feature-stats { display: grid; gap: 12px; align-content: center; }
.stat {
  border-radius: calc(var(--radius) - 4px); padding: 16px 18px; background: var(--bg-2);
  border: 1px solid var(--surface-border);
}
[data-theme="mirai"] .stat { background: rgba(255, 255, 255, .05); }
.stat strong { display: block; font: 700 30px var(--font-head); color: var(--accent); }
.stat span { color: var(--muted); font-size: 14px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.tags li { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--surface-border); }
[data-theme="mirai"] .tags li { background: rgba(255, 255, 255, .06); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.project { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s; }
a.project:hover { transform: translateY(-4px); border-color: var(--accent); }
.project h3 { font-size: 19px; }
.project p { margin: 0; color: var(--muted); font-size: 15px; }
.project .tags { margin-top: auto; padding-top: 6px; }
.project .link { color: var(--accent); font-weight: 600; font-size: 14px; }
.coursework { margin-top: 24px; color: var(--muted); }
.coursework summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.coursework ul { margin: 8px 0 0; }

/* ---------------------------------------------------------------- skills & education */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.skill h3, .edu h3 { font-size: 18px; margin-bottom: 6px; }
.skill p, .edu p { margin: 0; color: var(--muted); font-size: 15px; }
.edu-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; }
.edu .edu-where { color: var(--ink); font-weight: 500; margin-bottom: 8px; }
.cert-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 10px; grid-auto-flow: dense; }
.shot { position: relative; padding: 0; border: 0; border-radius: calc(var(--radius) - 4px); overflow: hidden; cursor: zoom-in; background: var(--bg-2); }
.shot.wide { grid-column: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.shot:hover img { transform: scale(1.06); }
.shot span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; text-align: left;
  font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  opacity: 0; transition: opacity .3s;
}
.shot:hover span, .shot:focus-visible span { opacity: 1; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 3, 12, .85); backdrop-filter: blur(4px); }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 12px; }
.lightbox-caption { color: #fff; text-align: center; margin: 10px 0 0; }
.lightbox-close {
  position: absolute; top: -14px; right: -14px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--on-accent); font-size: 22px; cursor: pointer;
}

/* ---------------------------------------------------------------- contact & footer */
.contact-card { padding: 34px; text-align: center; }
.contact-lead { font-size: 19px; margin: 0 0 20px; }
.contact-actions { justify-content: center; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 56px 16px 40px; }
.footer a { color: inherit; }

/* animated elements start hidden only when scripting is on (site.js adds .js) */
.js .reveal, .js .reveal-group > * { opacity: 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-tools { margin-left: auto; }
  .hero, .about-grid, .feature, .edu-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 32px; }
  .hero-photo { width: min(300px, 70vw); order: -1; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
}
@media (max-width: 520px) {
  .brand-name { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .shot.wide { grid-column: span 2; }
  .theme-toggle { padding: 0 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal-group > * { opacity: 1; }
  #sky { display: none !important; }
}
