:root {
  color-scheme: dark;
  --bg: #080a12;
  --bg-soft: #0d111c;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.11);
  --text: #f6f8ff;
  --muted: #a4adbf;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #7cf7d4;
  --accent-2: #8da2ff;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: rgba(124, 247, 212, 0.3); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--text);
  color: var(--bg);
  padding: .7rem 1rem;
  border-radius: 999px;
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(circle at 10% 10%, rgba(141, 162, 255, .16), transparent 32rem),
  radial-gradient(circle at 80% 5%, rgba(124, 247, 212, .13), transparent 28rem),
  linear-gradient(180deg, #080a12, #090b10 65%, #07080d);
}
.grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}
.orb { position: absolute; width: 34rem; height: 34rem; border-radius: 50%; filter: blur(70px); opacity: .28; animation: float 12s ease-in-out infinite alternate; }
.orb-a { background: #7cf7d4; left: -12rem; top: 10rem; }
.orb-b { background: #8da2ff; right: -10rem; bottom: 0; animation-delay: -5s; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(8,10,18,.82), rgba(8,10,18,.48));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 900; letter-spacing: -.04em; font-size: 1.15rem; }
.nav-links { display: flex; gap: .45rem; align-items: center; }
.nav-links a {
  color: var(--muted);
  padding: .65rem .85rem;
  border-radius: 999px;
  font-size: .92rem;
  transition: .2s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); background: rgba(255,255,255,.08); outline: none; }

.section { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2rem;
  align-items: center;
  padding: 7rem 0 5rem;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 900;
  font-size: .78rem;
  margin: 0 0 1rem;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 12ch;
  font-size: clamp(4.2rem, 12vw, 10rem);
  line-height: .86;
  letter-spacing: -.09em;
  margin-bottom: 1.5rem;
}
h2 { font-size: clamp(2.1rem, 5vw, 4.6rem); line-height: .95; letter-spacing: -.07em; margin-bottom: 1rem; }
h3 { font-size: clamp(1.8rem, 3vw, 2.8rem); letter-spacing: -.06em; line-height: 1; margin-bottom: 1rem; }
.hero-text { max-width: 620px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--text); color: var(--bg); border-color: transparent; }
.button.ghost { background: rgba(255,255,255,.06); color: var(--text); }

.hero-card, .tile, .project-card, .about {
  background: linear-gradient(145deg, var(--panel), rgba(255,255,255,.035));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.hero-card {
  border-radius: var(--radius);
  padding: 1rem;
  transform-style: preserve-3d;
}
.terminal-bar { display: flex; gap: .45rem; padding: .4rem .4rem 1rem; }
.terminal-bar span { width: .75rem; height: .75rem; border-radius: 50%; background: var(--line); }
.terminal-bar span:nth-child(1) { background: #ff6b6b; }
.terminal-bar span:nth-child(2) { background: #ffd166; }
.terminal-bar span:nth-child(3) { background: #7cf7d4; }
pre { margin: 0; white-space: pre-wrap; padding: 1.25rem; border-radius: 20px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); color: #d9ffee; font-size: clamp(.9rem, 2vw, 1.05rem); }

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem 0 5rem;
}
.tile { min-height: 210px; border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; justify-content: flex-end; }
.tile.wide { grid-column: span 2; }
.tile-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; font-weight: 900; letter-spacing: .14em; margin-bottom: .7rem; }
.tile strong { font-size: 2rem; letter-spacing: -.05em; }
.tile p { color: var(--muted); margin-bottom: 0; }

.work { padding: 5rem 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.project-card { position: relative; overflow: hidden; min-height: 430px; border-radius: var(--radius); padding: 1.35rem; display: flex; flex-direction: column; }
.project-card::before { content: ""; position: absolute; inset: -1px; background: radial-gradient(circle at var(--mx, 50%) var(--my, 20%), rgba(124,247,212,.16), transparent 17rem); pointer-events: none; opacity: .9; }
.project-topline, .project-card h3, .project-card p, .tags, .project-links { position: relative; }
.project-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; }
.project-icon { font-size: 2.2rem; }
.repo-stats { color: var(--muted); font-weight: 800; font-size: .9rem; }
.project-card p { color: var(--muted); font-size: 1.03rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0 1.4rem; list-style: none; }
.tags li { color: #dce4ff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: .45rem .65rem; font-size: .82rem; font-weight: 800; }
.project-links { display: flex; gap: .7rem; margin-top: auto; }
.project-links a { color: var(--accent); font-weight: 900; border-bottom: 1px solid rgba(124,247,212,.45); }

.about { margin-top: 1rem; margin-bottom: 5rem; border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 3rem); display: grid; grid-template-columns: .8fr 1fr; gap: 2rem; align-items: end; }
.about p:last-child { color: var(--muted); font-size: 1.1rem; margin-bottom: 0; }
.footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 2rem 0 3rem; color: var(--muted); border-top: 1px solid rgba(255,255,255,.09); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: var(--text); }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@keyframes float { to { transform: translate3d(2rem, -1rem, 0) scale(1.08); } }

@media (max-width: 860px) {
  .hero, .projects, .about { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 5rem; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile.wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .nav { min-height: 64px; }
  .nav-links a { padding: .55rem .5rem; font-size: .86rem; }
  h1 { font-size: clamp(4rem, 20vw, 6rem); }
  .bento { grid-template-columns: 1fr; }
  .tile.wide { grid-column: span 1; }
  .hero-actions, .project-links { flex-direction: column; }
  .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
