/* ==========================================================
   ELYTE portfolio – styles
   Edit the colours in :root to restyle the whole site.
   ========================================================== */
:root {
  --bg: #07090D;
  --surface: #0B1220;      /* deep navy */
  --surface-2: #10151D;    /* charcoal */
  --line: rgba(110, 231, 249, 0.14);
  --line-strong: rgba(110, 231, 249, 0.38);
  --cyan: #6EE7F9;
  --mint: #A2F5D0;
  --text: #EAF2F7;
  --muted: #93A1B2;
  --radius: 18px;
  --header-h: 68px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {  /* faint ambient glow, very restrained */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 520px at 82% -8%, rgba(110, 231, 249, 0.07), transparent 70%),
    radial-gradient(700px 480px at -10% 40%, rgba(162, 245, 208, 0.04), transparent 70%);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.narrow { max-width: 1160px; }
.narrow:not(.center) > * { max-width: 760px; }
.narrow:not(.center) > .timeline, .narrow:not(.center) > .education { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.muted-inline { color: var(--muted); font-weight: 400; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Focus + skip link */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--cyan); color: #04131a; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(7, 9, 13, 0.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(110, 231, 249, 0.08);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cyan); font-weight: 700; letter-spacing: 0.22em; font-size: 0.95rem; }
.wordmark span { color: var(--text); }
.site-nav ul { display: flex; gap: 6px; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-size: 0.95rem; transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--text); background: rgba(110, 231, 249, 0.07); }
.site-nav a[aria-current="true"] { color: var(--cyan); background: rgba(110, 231, 249, 0.1); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center-row { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: 600 0.98rem/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s, box-shadow .25s, border-color .2s, background .2s;
}
.btn-primary { background: var(--cyan); color: #04131a; box-shadow: 0 0 0 rgba(110, 231, 249, 0); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(110, 231, 249, 0.22); }
.btn-ghost { background: rgba(255, 255, 255, 0.02); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--cyan); background: rgba(110, 231, 249, 0.07); }

/* Typography helpers */
.eyebrow { font: 600 0.78rem/1 var(--mono); letter-spacing: 0.24em; color: var(--cyan); margin-bottom: 18px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #BFCBD8; max-width: 56ch; }
.center .lead { margin-inline: auto; }
.grad { background: linear-gradient(95deg, var(--cyan), var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Hero */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 800; margin-bottom: 24px; letter-spacing: -0.035em; }
.hero .lead { margin-bottom: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 38px; font: 500 0.82rem/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; }
.hero-meta li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); margin-right: 9px; vertical-align: 1px; opacity: .8; }

/* Globe */
.globe { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin-inline: auto; }
.globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.globe-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.globe.is-ready canvas { opacity: 1; }
.globe.is-ready .globe-fallback { display: none; }

/* Sections */
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 750; }
.section-head { margin-bottom: clamp(30px, 5vw, 52px); }
.section-note { color: var(--muted); margin: 16px 0 0; max-width: 62ch; }
#about p { color: #C6D1DC; }
#about h2 { margin-bottom: 26px; }
#about p:last-child { margin-bottom: 0; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 30px 28px 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 21, 29, 0.85), rgba(11, 18, 32, 0.6));
  border: 1px solid var(--line);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 18px 50px -24px rgba(110, 231, 249, 0.28); }
.card h3 { font-size: 1.28rem; margin: 14px 0 12px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 1rem; flex: 1; }
.card-index { font: 600 0.8rem/1 var(--mono); color: var(--mint); letter-spacing: 0.1em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags li { font: 500 0.78rem/1 var(--mono); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); color: #BFE9F0; background: rgba(110, 231, 249, 0.05); }

.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; border: 1px solid; }
.badge-planned { color: var(--mint); border-color: rgba(162, 245, 208, 0.35); background: rgba(162, 245, 208, 0.06); }
.badge-progress { color: var(--cyan); border-color: rgba(110, 231, 249, 0.4); background: rgba(110, 231, 249, 0.07); }
.link-pending { margin-top: 6px; padding-top: 16px; border-top: 1px dashed rgba(147, 161, 178, 0.25); font: 500 0.82rem/1 var(--mono); color: var(--muted); }
.card-link { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); font: 600 0.9rem/1 var(--font); color: var(--cyan); text-decoration: none; }
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Experience */
.timeline { border-left: 1px solid var(--line-strong); padding-left: 28px; margin-left: 6px; }
.timeline li { position: relative; padding-bottom: 6px; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(110, 231, 249, 0.12); }
.timeline-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 20px; margin-bottom: 10px; }
.timeline h3 { font-size: 1.3rem; }
.timeline .at { color: var(--cyan); font-weight: 600; }
.timeline .date { font: 500 0.85rem/1.4 var(--mono); color: var(--muted); margin: 0; }
.timeline li > p { color: #C6D1DC; margin: 0; }
.education { margin-top: 52px; padding: 26px 28px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(16, 21, 29, 0.6); }
.education .eyebrow { margin-bottom: 14px; }
.education h3 { font-size: 1.2rem; margin-bottom: 4px; }
.education p { margin: 0; }

/* Contact */
.contact { padding-bottom: clamp(70px, 10vw, 130px); }
.contact .container { max-width: 920px; padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 40px); border-radius: 28px; border: 1px solid var(--line); background: radial-gradient(520px 260px at 50% 0%, rgba(110, 231, 249, 0.09), transparent 70%), linear-gradient(180deg, rgba(16, 21, 29, 0.8), rgba(11, 18, 32, 0.55)); }
.contact h2 { margin-bottom: 20px; }
.contact .lead { margin-bottom: 34px; }
.contact-line { margin: 26px 0 0; font: 400 0.9rem/1 var(--mono); }

/* Footer */
.site-footer { border-top: 1px solid rgba(110, 231, 249, 0.08); padding: 34px 0 44px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 24px; }
.footer-brand { font: 700 0.85rem/1 var(--mono); letter-spacing: 0.2em; margin: 0 0 8px; color: var(--text); }
.site-footer p { margin: 0; font-size: 0.92rem; }

/* Scroll reveal (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 980px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .globe { max-width: 420px; }
}

/* Mobile navigation */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: rgba(7, 9, 13, 0.97); border-bottom: 1px solid var(--line);
    padding: 10px clamp(20px, 5vw, 40px) 20px;
    display: none;
  }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 14px 12px; font-size: 1.05rem; border-radius: 12px; }
  html:not(.js) .site-header { height: auto; position: static; }
  html:not(.js) .header-inner { flex-direction: column; align-items: flex-start; padding-block: 12px; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .center-row .btn { flex: 1 1 100%; }
  .globe { max-width: 340px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .card:hover, .btn:hover { transform: none; }
}
