@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --bg: #080b11;
  --bg-soft: #0e1420;
  --panel: rgba(14, 20, 32, 0.76);
  --panel-strong: rgba(17, 25, 40, 0.94);
  --text: #eef4ff;
  --muted: #98a6bd;
  --muted-2: #657286;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --accent-3: #34d399;
  --danger: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 24px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body::selection {
  background: rgba(125, 211, 252, 0.35);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 99;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-bg,
.noise,
.mesh,
.grid-floor {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.site-bg {
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.14), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(167, 139, 250, 0.16), transparent 30%),
    linear-gradient(180deg, #080b11 0%, #0b1020 55%, #080b11 100%);
}

.noise {
  opacity: 0.055;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

.mesh {
  width: 430px;
  height: 430px;
  margin: auto;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.38;
}

.mesh-a {
  transform: translate(-34vw, -18vh);
  background: var(--accent);
}

.mesh-b {
  transform: translate(38vw, 36vh);
  background: var(--accent-2);
}

.grid-floor {
  top: 48%;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.07) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(920px) rotateX(62deg) scale(1.25);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, black 28%, transparent 78%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.nav-toggle {
  border: 1px solid var(--line);
  background: rgba(8, 11, 17, 0.62);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  font-family: var(--mono);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07111f;
}

.brand-text {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  gap: 4px;
  padding: 7px;
  border-radius: 999px;
}

.site-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(125, 211, 252, 0.12);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: var(--text);
}

main,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 90px 0;
}

.hero {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 56px;
  padding-top: 48px;
}

.section-kicker,
.project-role,
.handle,
.availability,
.scroll-cue {
  font-family: var(--mono);
}

.section-kicker {
  margin: 0 0 18px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 9px 13px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  color: #bbf7d0;
  font-size: 0.86rem;
}

.availability::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 18px var(--accent-3);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 12px;
  font-size: clamp(3.4rem, 8vw, 7.3rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.handle {
  margin-bottom: 26px;
  color: var(--muted);
}

.hero-title {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  line-height: 1.25;
  color: var(--text);
}

.hero-summary,
.rich-text p,
.section-head p,
.timeline-item p,
.project-card p,
.contact-lead {
  color: var(--muted);
  line-height: 1.72;
}

.hero-summary {
  max-width: 720px;
  margin-bottom: 32px;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.62);
}

.btn.primary {
  background: var(--text);
  color: #08101c;
}

.btn.secondary {
  background: rgba(125, 211, 252, 0.14);
  color: var(--text);
}

.btn.ghost {
  color: var(--muted);
  background: rgba(14, 20, 32, 0.55);
}

.hero-visual {
  justify-self: end;
  width: min(100%, 470px);
}

.portrait-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.34));
  box-shadow: var(--shadow);
}

.portrait-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.42), rgba(167, 139, 250, 0.18), transparent);
}

.portrait-frame {
  display: grid;
  min-height: 350px;
  place-items: center;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(125, 211, 252, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(125, 211, 252, 0.12), rgba(167, 139, 250, 0.16));
}

.portrait-initials {
  display: grid;
  width: 170px;
  height: 170px;
  place-items: center;
  border-radius: 42px;
  font-family: var(--mono);
  font-size: 3.6rem;
  font-weight: 800;
  color: #07111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 30px 90px rgba(125, 211, 252, 0.22);
}

.terminal-card {
  margin-top: -72px;
  margin-inline: 24px;
  padding: 16px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 18px;
  background: rgba(6, 10, 17, 0.92);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
}

.terminal-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
}

.terminal-top span:nth-child(2) { background: #fbbf24; }
.terminal-top span:nth-child(3) { background: var(--accent-3); }

.terminal-top strong {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.78rem;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  color: #c4f1ff;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.65;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 0;
  color: var(--muted-2);
  text-decoration: none;
  writing-mode: vertical-rl;
  letter-spacing: 0.18em;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
  border-top: 1px solid var(--line);
}

h2 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(2rem, 4.2vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.rich-text {
  display: grid;
  gap: 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 34px;
}

.section-head p {
  max-width: 410px;
  margin-bottom: 8px;
}

.metrics,
.project-grid,
.skill-grid,
.contact-grid {
  display: grid;
  gap: 16px;
}

.metrics {
  grid-template-columns: repeat(4, 1fr);
}

.metric-card,
.project-card,
.skill-card,
.timeline-item,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
}

.metric-card {
  padding: 24px;
}

.metric-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.06em;
}

.metric-card span {
  color: var(--muted);
  line-height: 1.5;
}

.project-grid {
  grid-template-columns: repeat(2, 1fr);
}

.project-card {
  position: relative;
  min-height: 330px;
  padding: 26px;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.5);
  background: var(--panel-strong);
}

.project-number {
  position: absolute;
  top: 20px;
  right: 24px;
  color: rgba(238, 244, 255, 0.08);
  font-family: var(--mono);
  font-size: 4rem;
  font-weight: 800;
}

.project-role {
  color: var(--accent-3);
  font-size: 0.84rem;
}

.project-card h3,
.skill-card h3,
.timeline-item h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  line-height: 1.25;
}

.project-card p {
  min-height: 112px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.tag-list span {
  padding: 7px 10px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(125, 211, 252, 0.08);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.project-card a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.skill-grid {
  grid-template-columns: repeat(3, 1fr);
}

.skill-card {
  padding: 24px;
}

.skill-row + .skill-row {
  margin-top: 18px;
}

.skill-row-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.skill-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.14);
}

.skill-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 26px;
  padding: 24px;
}

.timeline-item time {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.86rem;
}

.timeline-title {
  margin-bottom: 8px;
  color: var(--text) !important;
  font-weight: 700;
}

.contact-section {
  padding-bottom: 76px;
}

.contact-lead {
  max-width: 720px;
  margin-bottom: 28px;
  font-size: 1.08rem;
}

.contact-grid {
  grid-template-columns: repeat(5, 1fr);
}

.contact-card {
  padding: 20px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 211, 252, 0.5);
}

.contact-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.contact-card strong {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 74px;
    right: 0;
    display: none;
    width: min(310px, 100%);
    flex-direction: column;
    border-radius: 22px;
  }

  .site-nav.open {
    display: flex;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    justify-self: stretch;
  }

  .scroll-cue {
    display: none;
  }

  .section-head {
    display: block;
  }

  .metrics,
  .project-grid,
  .skill-grid,
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  main,
  .site-footer,
  .site-header {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding: 62px 0;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.8rem);
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
  }

  .metrics,
  .project-grid,
  .skill-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .portrait-frame {
    min-height: 280px;
  }

  .terminal-card {
    margin-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
