:root {
  --bg: #080d18;
  --bg-2: #0b1221;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --text: #f5f7fb;
  --muted: #a9b2c3;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #73e7d4;
  --accent-2: #82a8ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 75% 10%, rgba(76, 123, 255, 0.13), transparent 30%),
    radial-gradient(circle at 15% 30%, rgba(64, 224, 196, 0.09), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: rgba(115, 231, 212, 0.25); color: white; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.section { padding: 112px 0; position: relative; }
.section-soft { border-block: 1px solid var(--line); background: rgba(255,255,255,.018); }

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(8, 13, 24, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(8, 13, 24, .9); }
.nav-wrap { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 800; letter-spacing: -.04em; font-size: 22px; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 30px; align-items: center; color: #c7ceda; font-size: 14px; font-weight: 600; }
.nav a { transition: color .2s ease; }
.nav a:hover { color: white; }
.nav-cta { border: 1px solid var(--line); padding: 9px 14px; border-radius: 99px; background: rgba(255,255,255,.035); }
.menu-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; padding: 10px; }
.menu-toggle span { display: block; height: 1px; background: white; margin: 7px 0; }

.hero { padding-top: 180px; min-height: 780px; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 70px; }
.eyebrow, .kicker { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; color: var(--accent); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: #c6ceda; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(115,231,212,.08); }
.hero h1 { margin: 0; max-width: 790px; font-size: clamp(52px, 6.1vw, 88px); line-height: .99; letter-spacing: -.062em; font-weight: 760; }
.hero h1 span { color: transparent; background: linear-gradient(95deg, #ffffff 5%, #73e7d4 55%, #82a8ff 100%); -webkit-background-clip: text; background-clip: text; }
.hero-lead { max-width: 720px; margin: 30px 0 0; font-size: 19px; color: var(--muted); }
.hero-lead strong { color: white; font-weight: 650; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 20px; border-radius: 12px; font-weight: 750; font-size: 14px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: #0b1020; }
.btn-secondary { border: 1px solid var(--line); background: rgba(255,255,255,.035); color: white; }
.btn-secondary:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.07); }
.hero-meta { display: flex; gap: 42px; margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-meta div { display: grid; gap: 1px; }
.hero-meta strong { font-size: 18px; }
.hero-meta span { color: var(--muted); font-size: 12px; }

.hero-visual { position: relative; min-height: 490px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-one { width: 360px; height: 360px; background: radial-gradient(circle at 35% 35%, rgba(115,231,212,.35), rgba(64,90,255,.06) 55%, transparent 68%); animation: drift 8s ease-in-out infinite; }
.orb-two { width: 240px; height: 240px; right: 3%; bottom: 0; background: radial-gradient(circle, rgba(130,168,255,.18), transparent 68%); animation: drift 9s ease-in-out infinite reverse; }
@keyframes drift { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(14px,-18px,0); } }
.terminal-card { width: min(100%, 520px); position: relative; z-index: 2; overflow: hidden; border-radius: 22px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(19,28,47,.92), rgba(10,17,30,.88)); box-shadow: var(--shadow); transform: rotate(1.5deg); }
.terminal-top { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); color: #778197; font-size: 12px; }
.dots { display: flex; gap: 7px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: #465064; }
.terminal-card pre { margin: 0; padding: 26px 30px 32px; overflow: auto; color: #e8edf6; font: 14px/1.9 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.code-muted { color: #68738a; }.code-key { color: #96b8ff; }.code-value { color: #8fe8c4; }.code-accent { color: #f0b985; }

.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.section-heading h2 { max-width: 760px; font-size: clamp(38px, 4.4vw, 58px); line-height: 1.06; letter-spacing: -.045em; margin: 12px 0 0; }
.kicker { margin: 0; }
.about-copy { max-width: 700px; font-size: 20px; color: #bcc4d1; }
.about-copy p { margin-top: 0; }
.about-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; font-weight: 700; color: white; margin-top: 30px; }
.about-links a { border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 3px; }

.project-heading { display: flex; justify-content: space-between; gap: 50px; align-items: end; margin-bottom: 46px; }
.section-note { color: var(--muted); max-width: 430px; margin: 0 0 8px; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.project-card { position: relative; min-height: 430px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(255,255,255,.052), rgba(255,255,255,.022)); padding: 28px; display: grid; grid-template-columns: 48px 1fr; gap: 14px; transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.project-card:hover { transform: translateY(-4px); border-color: rgba(115,231,212,.35); background: linear-gradient(150deg, rgba(255,255,255,.075), rgba(255,255,255,.028)); }
.project-card.featured { grid-column: 1 / -1; min-height: 390px; padding-right: min(34vw, 430px); }
.project-index { color: #677186; font-size: 12px; font-weight: 800; padding-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.tags span { font-size: 11px; font-weight: 750; color: #cbd3df; border: 1px solid var(--line); border-radius: 99px; padding: 6px 9px; background: rgba(255,255,255,.025); }
.project-card h3 { font-size: 27px; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 14px; }
.project-card p { color: var(--muted); margin: 0; }
.project-points { margin: 20px 0 0; padding-left: 18px; color: #c4ccd8; font-size: 14px; }
.project-points li + li { margin-top: 8px; }
.project-mark { position: absolute; right: 26px; bottom: 18px; color: rgba(255,255,255,.035); font-weight: 900; font-size: 110px; line-height: 1; letter-spacing: -.08em; user-select: none; }
.featured .project-mark { right: 56px; bottom: 40px; font-size: 180px; background: linear-gradient(135deg, rgba(115,231,212,.15), rgba(130,168,255,.07)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.more-work { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 24px; display: grid; grid-template-columns: 140px 1fr; gap: 20px; }
.more-work span { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.more-work p { margin: 0; color: var(--muted); }

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 48px; }
.skill-group { border: 1px solid var(--line); border-radius: 20px; padding: 26px; background: rgba(255,255,255,.025); }
.skill-group h3 { margin: 0 0 18px; font-size: 17px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-list span { background: rgba(255,255,255,.055); color: #ced5df; border: 1px solid rgba(255,255,255,.06); padding: 7px 10px; border-radius: 9px; font-size: 13px; }

.timeline { margin-top: 54px; border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.timeline-date { color: #8691a4; font-size: 13px; font-weight: 700; padding-top: 7px; }
.timeline-type { color: var(--accent) !important; font-size: 11px !important; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.timeline-content h3 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.025em; }
.timeline-content p { color: var(--muted); margin: 0; }
.timeline-content ul { padding-left: 18px; color: #c3cbd6; margin-bottom: 0; }
.timeline-content li + li { margin-top: 7px; }
.coursework { margin-top: 14px !important; max-width: 750px; }

.contact-section { padding-top: 65px; }
.contact-card { border: 1px solid var(--line); background: linear-gradient(130deg, rgba(115,231,212,.09), rgba(130,168,255,.065) 55%, rgba(255,255,255,.025)); border-radius: 30px; padding: clamp(36px, 6vw, 76px); box-shadow: var(--shadow); }
.contact-card h2 { font-size: clamp(40px, 5vw, 64px); line-height: 1.02; letter-spacing: -.05em; margin: 14px 0 20px; max-width: 850px; }
.contact-card > p:not(.kicker):not(.contact-email) { color: #c0c8d5; max-width: 700px; font-size: 18px; }
.contact-email { margin: 36px 0 0; color: #7f8a9f; font-size: 13px; }
.footer { padding: 32px 0 44px; }
.footer-inner { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; gap: 20px; color: #7f899c; font-size: 12px; }
.footer a:hover { color: white; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .1s; }

@media (max-width: 980px) {
  .section { padding: 88px 0; }
  .hero { padding-top: 140px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { min-height: 410px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .project-heading { display: block; }
  .section-note { margin-top: 22px; }
  .project-card.featured { padding-right: 28px; }
  .featured .project-mark { opacity: .35; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 26px, var(--max)); }
  .section { padding: 72px 0; }
  .nav-wrap { height: 68px; }
  .menu-toggle { display: block; }
  .nav { position: absolute; top: 68px; left: 13px; right: 13px; padding: 18px; display: grid; gap: 4px; background: rgba(12,19,33,.98); border: 1px solid var(--line); border-radius: 16px; transform-origin: top; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transition: .2s ease; box-shadow: var(--shadow); }
  .nav.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
  .nav a { padding: 10px 8px; }
  .nav-cta { border-radius: 10px; }
  .hero { min-height: auto; padding-top: 128px; }
  .hero h1 { font-size: clamp(46px, 14vw, 68px); }
  .hero-lead { font-size: 17px; }
  .hero-meta { gap: 20px; justify-content: space-between; }
  .hero-meta strong { font-size: 16px; }
  .hero-visual { min-height: 330px; }
  .terminal-card { transform: none; }
  .terminal-card pre { padding: 20px; font-size: 12px; }
  .projects-grid, .skills-grid { grid-template-columns: 1fr; }
  .project-card, .project-card.featured { grid-column: auto; min-height: auto; padding: 24px; grid-template-columns: 34px 1fr; }
  .project-mark { font-size: 80px; opacity: .35; }
  .project-card.featured .project-mark { font-size: 100px; right: 22px; bottom: 22px; }
  .more-work { grid-template-columns: 1fr; gap: 8px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .contact-card { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
