/* Futuristic coral + black layer (chrome type, glass cards) over theme-clean.css.
   Loaded last. Dark is the default look; light mode is a cool silver variant. */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;500;600&display=swap');

/* ---------- Tokens: dark ---------- */
:root,
[data-theme="dark"] {
  --paper: #070707;
  --paper-2: #0c0b0b;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #f4f1ee;
  --ink-soft: #b3aca6;
  --ink-muted: #7a736d;
  --accent: #ff5a4f;
  --accent-soft: rgba(255, 90, 79, 0.16);
  --wash: rgba(255, 90, 79, 0.05);
  --nav-bg: rgba(7, 7, 7, 0.55);
  --shadow-card: 0 30px 60px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --btn-ink-bg: #f4f1ee;
  --btn-ink-text: #070707;
  --status-green: #5eead4;
  --scheme: dark;

  --chrome-text: linear-gradient(180deg, #ffffff 0%, #e2ddd9 38%, #77706b 52%, #d3cdc8 70%, #ffffff 100%);
  --iridescent: linear-gradient(110deg, #ff3d33 0%, #ff5a4f 35%, #ffa89c 65%, #ff5a4f 100%);
  --chrome-btn: linear-gradient(180deg, #ffffff 0%, #e0dbd7 45%, #a49d98 55%, #efebe8 100%);
  --glass-blur: blur(18px) saturate(150%);
  --glow-a: rgba(255, 106, 61, 0.16);
  --glow-b: rgba(255, 90, 79, 0.08);
  --grain-opacity: 0.06;
}

/* ---------- Tokens: light ---------- */
[data-theme="light"] {
  --paper: #f3f1ef;
  --paper-2: #ebe8e5;
  --card: rgba(255, 255, 255, 0.55);
  --card-hover: rgba(255, 255, 255, 0.75);
  --line: rgba(12, 16, 24, 0.08);
  --line-strong: rgba(12, 16, 24, 0.18);
  --ink: #0d0c0c;
  --ink-soft: #4f4945;
  --ink-muted: #85807b;
  --accent: #e8552d;
  --accent-soft: rgba(232, 85, 45, 0.12);
  --wash: rgba(232, 85, 45, 0.05);
  --nav-bg: rgba(243, 241, 239, 0.6);
  --shadow-card: 0 24px 50px -28px rgba(20, 30, 60, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --btn-ink-bg: #0d0c0c;
  --btn-ink-text: #ffffff;
  --status-green: #0f9f7a;
  --scheme: light;

  --chrome-text: linear-gradient(180deg, #34302d 0%, #0d0c0c 40%, #66605b 55%, #1c1a19 75%, #3d3936 100%);
  --iridescent: linear-gradient(110deg, #d8401a 0%, #e8552d 40%, #ff8a63 70%, #e8552d 100%);
  --chrome-btn: linear-gradient(180deg, #2f2b29 0%, #0d0c0c 50%, #2a2725 100%);
  --glow-a: rgba(232, 85, 45, 0.14);
  --glow-b: rgba(232, 85, 45, 0.07);
  --grain-opacity: 0.05;
}

:root,
[data-theme="light"],
[data-theme="dark"] {
  --font-display: 'Unbounded', 'Plus Jakarta Sans', system-ui, sans-serif;
  --radius-glass: 22px;
}

/* ---------- Ambient background: two soft glows + film grain ---------- */
body {
  background-color: var(--paper);
  background-image:
    radial-gradient(60vw 50vw at 85% -10%, var(--glow-a), transparent 60%),
    radial-gradient(50vw 45vw at -10% 40%, var(--glow-b), transparent 60%);
  background-attachment: fixed;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Sections let the ambient glow show through */
.section,
.section-darker {
  background: transparent;
  border-color: var(--line);
}
.section-darker {
  background: linear-gradient(180deg, transparent, rgba(127, 140, 170, 0.035) 20%, rgba(127, 140, 170, 0.035) 80%, transparent);
}

/* ---------- Navigation: floating glass pill ---------- */
.navbar {
  background: var(--nav-bg) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line);
}

.logo-text,
.nav-logo strong {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.nav-link.active {
  color: var(--ink);
}

/* ---------- Typography ---------- */
.hero-title,
.section-heading,
.stat-number {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 1;
  max-width: 11.5ch;
  background: var(--chrome-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-title .gradient-text,
.gradient-text {
  font-style: normal;
  background: var(--iridescent);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: chrome-shift 8s ease-in-out infinite alternate;
}

.hero-title .gradient-text::after {
  display: none;
}

@keyframes chrome-shift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.section-heading {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  background: var(--chrome-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-heading::before {
  background: var(--iridescent);
  width: 56px;
  height: 2px;
  border-radius: 2px;
}

.section-tag {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  background: var(--iridescent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-description {
  max-width: 54ch;
  color: var(--ink-soft);
}

/* ---------- Hero layout ---------- */
.hero-section {
  background: transparent;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-canvas {
  opacity: 1;
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}

.hero-eyebrow {
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* Static Scorpio constellation for reduced motion or no WebGL */
.hero-backdrop.scorpio-fallback::before {
  content: '';
  position: absolute;
  width: min(40vw, 520px);
  aspect-ratio: 1;
  right: 4vw;
  top: 12%;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 500'><circle cx='250' cy='250' r='235' fill='none' stroke='%23ff5a4f' stroke-opacity='.25'/><circle cx='250' cy='250' r='222' fill='none' stroke='%23ff5a4f' stroke-opacity='.12'/><g stroke='%23ff5a4f' stroke-opacity='.55' stroke-width='1.4'><line x1='394.1' y1='50.5' x2='419.9' y2='56.4'/><line x1='419.9' y1='56.4' x2='436.7' y2='103.5'/><line x1='436.7' y1='103.5' x2='437.2' y2='162.1'/><line x1='436.7' y1='103.5' x2='353.6' y2='153.4'/><line x1='353.6' y1='153.4' x2='322.2' y2='167.4'/><line x1='322.2' y1='167.4' x2='297.2' y2='197.5'/><line x1='297.2' y1='197.5' x2='245.5' y2='299.3'/><line x1='245.5' y1='299.3' x2='240.8' y2='362.4'/><line x1='240.8' y1='362.4' x2='233.8' y2='434.8'/><line x1='233.8' y1='434.8' x2='180.5' y2='449.5'/><line x1='180.5' y1='449.5' x2='103.1' y2='445.5'/><line x1='103.1' y1='445.5' x2='62.8' y2='397.3'/><line x1='62.8' y1='397.3' x2='76.2' y2='378.8'/><line x1='76.2' y1='378.8' x2='100.9' y2='346.5'/><line x1='100.9' y1='346.5' x2='110.7' y2='349.8'/></g><circle cx='394.1' cy='50.5' r='1.8' fill='%23f4f1ee'/><circle cx='419.9' cy='56.4' r='3.0' fill='%23f4f1ee'/><circle cx='436.7' cy='103.5' r='3.3' fill='%23f4f1ee'/><circle cx='437.2' cy='162.1' r='2.8' fill='%23f4f1ee'/><circle cx='353.6' cy='153.4' r='2.8' fill='%23f4f1ee'/><circle cx='322.2' cy='167.4' r='16' fill='%23ff5a4f' fill-opacity='.25'/><circle cx='322.2' cy='167.4' r='6' fill='%23ff5a4f'/><circle cx='297.2' cy='197.5' r='2.9' fill='%23f4f1ee'/><circle cx='245.5' cy='299.3' r='3.3' fill='%23f4f1ee'/><circle cx='240.8' cy='362.4' r='2.7' fill='%23f4f1ee'/><circle cx='233.8' cy='434.8' r='2.1' fill='%23f4f1ee'/><circle cx='180.5' cy='449.5' r='2.4' fill='%23f4f1ee'/><circle cx='103.1' cy='445.5' r='3.7' fill='%23f4f1ee'/><circle cx='62.8' cy='397.3' r='2.7' fill='%23f4f1ee'/><circle cx='76.2' cy='378.8' r='3.2' fill='%23f4f1ee'/><circle cx='100.9' cy='346.5' r='3.9' fill='%23f4f1ee'/><circle cx='110.7' cy='349.8' r='3.0' fill='%23f4f1ee'/></svg>") center / contain no-repeat;
  filter: drop-shadow(0 0 24px rgba(255, 90, 79, 0.35));
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--chrome-btn);
  color: var(--btn-ink-text);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px -12px rgba(255, 90, 79, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
[data-theme="light"] .btn-primary {
  border-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 10px 30px -12px rgba(232, 85, 45, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover {
  background: var(--card-hover);
  border-color: var(--ink-soft);
}

.btn-ghost {
  text-decoration-color: var(--accent);
}

/* ---------- Glass surfaces ---------- */
.stat-card,
.project-card,
.contact-card,
.skill-group-card,
.edu-card,
.arch-tab,
.arch-viewer,
.timeline-content,
.value-card,
.projects-toolbar .project-search-wrap,
.copy-field {
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: var(--radius-glass);
  box-shadow: var(--shadow-card);
}

.copy-field {
  border-radius: 14px;
}

/* Chrome edge that lights up on hover */
.project-card,
.stat-card,
.contact-card,
.skill-group-card {
  position: relative;
}
.project-card::before,
.stat-card::before,
.contact-card::before,
.skill-group-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--iridescent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.project-card:hover::before,
.stat-card:hover::before,
.contact-card:hover::before,
.skill-group-card:hover::before {
  opacity: 1;
}
.project-card:hover,
.stat-card:hover {
  background: var(--card-hover);
  border-color: transparent;
}

.stat-number {
  background: var(--chrome-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.card-num {
  font-family: var(--font-display);
  background: var(--iridescent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.filter-btn {
  border-radius: 999px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.filter-btn.active {
  background: var(--chrome-btn);
  color: var(--btn-ink-text);
  border-color: transparent;
}

.val-icon,
.skill-group-icon,
.contact-icon {
  font-family: var(--font-display);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.25), transparent 60%), var(--card);
}

.scroll-progress {
  background: var(--iridescent);
  height: 2px;
}

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

/* Timeline dots become small chrome beads */
.timeline-dot {
  background: var(--chrome-btn) !important;
  border-color: var(--line-strong) !important;
  box-shadow: 0 0 18px rgba(255, 90, 79, 0.45);
}

/* Modal: deep glass */
.modal-content,
.project-modal .modal-content {
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-glass);
}

@media (min-width: 761px) and (max-width: 1100px) {
  .hero-backdrop.scorpio-fallback::before {
    width: 30vw;
    top: 8%;
    right: 3vw;
  }
}

/* ---------- Phones: blob sits above the headline ---------- */
@media (max-width: 760px) {
  .hero-section {
    align-items: flex-start;
  }
  .hero-backdrop {
    bottom: auto;
    height: 46vh;
    height: 46svh;
  }
  .hero-container {
    padding-top: 36vh;
    padding-top: 36svh;
  }
  .hero-title {
    max-width: none;
  }
  .hero-backdrop.scorpio-fallback::before {
    width: 70vw;
    right: 15vw;
    top: 7vh;
  }
  body {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .gradient-text,
  .gradient-text {
    animation: none;
  }
}
