:root {
  --sidebar: 292px;
  --ink: #102033;
  --muted: #627083;
  --line: #dfe6ee;
  --soft: #f4f8fb;
  --white: #ffffff;
  --navy: #08111f;
  --navy-2: #0d1b2d;
  --blue: #149ddd;
  --blue-2: #4cc6ff;
  --green: #2dd4a8;
  --shadow: 0 18px 45px rgba(18, 38, 63, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(20, 157, 221, 0.22); }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 9999;
  background: var(--white);
  color: var(--navy);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 16px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: linear-gradient(180deg, #07101d 0%, #0a1524 65%, #09111d 100%);
  color: #d7e3ee;
  padding: 38px 24px 24px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  border-right: 1px solid rgba(255,255,255,0.07);
}

.profile { text-align: center; }
.avatar {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.08);
  background: linear-gradient(145deg, var(--blue), #0e6cad);
  color: white;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 30px rgba(20, 157, 221, 0.2);
}
.profile h1 { color: #fff; font-size: 21px; line-height: 1.2; margin: 0; }
.profile p { color: #8fa0b4; font-size: 13px; margin: 7px 0 16px; }
.profile-links { display: flex; justify-content: center; gap: 9px; }
.profile-links a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.06);
  color: #dbe8f2;
  font-size: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}
.profile-links a:hover, .profile-links a:focus-visible { background: var(--blue); color: #fff; transform: translateY(-2px); }

.nav { display: grid; gap: 4px; margin-top: 34px; }
.nav-link {
  padding: 11px 13px;
  border-radius: 10px;
  color: #91a3b5;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}
.nav-link span { color: #53677b; font-size: 10px; letter-spacing: 0.12em; margin-right: 12px; }
.nav-link:hover, .nav-link:focus-visible, .nav-link.active { background: rgba(255,255,255,0.06); color: #fff; }
.nav-link.active span { color: var(--blue-2); }

.sidebar-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #718499;
  padding-top: 16px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(45,212,168,0.08); }

.menu-toggle {
  display: none;
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 1200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--blue);
  box-shadow: 0 8px 24px rgba(8,17,31,0.18);
  padding: 12px;
  cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; background: white; margin: 4px 0; border-radius: 2px; }

.site-main { margin-left: var(--sidebar); min-width: 0; }
.section { padding: 96px clamp(32px, 6vw, 96px); }
.section-light { background: var(--white); }
.section-soft { background: var(--soft); }
.section-dark { background: var(--navy); color: white; }

.section-heading { max-width: 860px; margin-bottom: 46px; }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.section-kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.section-heading h2, .contact-wrap h2 {
  font-size: clamp(30px, 4.1vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0;
}
.section-heading > p:last-child { color: var(--muted); max-width: 680px; margin-top: 14px; }
.section-dark .section-heading > p:last-child { color: #9eb0c2; }

.hero {
  min-height: 100vh;
  padding: 80px clamp(34px, 7vw, 100px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  align-items: center;
  gap: 62px;
  overflow: hidden;
  isolation: isolate;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -4;
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to right, black, transparent 80%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: radial-gradient(circle at 30% 40%, rgba(20,157,221,0.12), transparent 38%), linear-gradient(105deg, rgba(4,11,20,0.12), rgba(4,11,20,0.7));
}
.hero-orb { position: absolute; z-index: -2; border-radius: 50%; filter: blur(3px); }
.orb-one { width: 380px; height: 380px; right: -120px; top: -100px; background: radial-gradient(circle at 30% 30%, rgba(76,198,255,0.18), rgba(20,157,221,0.03) 65%, transparent 68%); }
.orb-two { width: 250px; height: 250px; left: 35%; bottom: -120px; background: radial-gradient(circle, rgba(45,212,168,0.12), transparent 65%); }
.hero-content { max-width: 780px; }
.eyebrow { color: var(--blue-2); font-size: 12px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; margin: 0 0 22px; }
.hero h2 { font-size: clamp(45px, 6vw, 78px); line-height: 0.98; margin: 0; letter-spacing: -0.055em; max-width: 900px; }
.hero-role { margin: 26px 0 10px; font-size: clamp(23px, 2.8vw, 36px); color: #d9e8f5; letter-spacing: -0.02em; }
.hero-role span:first-child { color: var(--blue-2); font-weight: 700; }
.cursor { color: var(--blue-2); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-summary { max-width: 720px; color: #9eafc1; font-size: 17px; margin: 20px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 10px; font-size: 14px; font-weight: 800; transition: .2s ease; }
.button-primary { background: var(--blue); color: white; box-shadow: 0 12px 24px rgba(20,157,221,0.2); }
.button-primary:hover, .button-primary:focus-visible { background: #22adef; transform: translateY(-2px); }
.button-secondary { border: 1px solid rgba(255,255,255,0.14); color: #e5f0f8; background: rgba(255,255,255,0.03); }
.button-secondary:hover, .button-secondary:focus-visible { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.07); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); }
.hero-meta div { display: grid; gap: 2px; }
.hero-meta strong { font-size: 20px; color: #fff; }
.hero-meta span { color: #74899f; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.code-card {
  justify-self: end;
  width: min(100%, 520px);
  background: rgba(12, 25, 42, 0.72);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transform: rotate(1.2deg);
}
.code-card-top { display: flex; gap: 7px; padding: 14px 16px; background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.06); }
.code-card-top span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.16); }
.code-card pre { margin: 0; padding: 28px; overflow: auto; font: 13px/1.9 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; color: #dce9f5; }
.code-dim { color: #8193a6; }
.code-string { color: #61d5bb; }
.scroll-cue { position: absolute; bottom: 28px; left: clamp(34px, 7vw, 100px); color: #5f758c; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.scroll-cue span { color: var(--blue-2); margin-left: 5px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 70px; align-items: start; }
.about-copy { max-width: 760px; }
.about-copy p { color: #536176; font-size: 16px; }
.about-copy .lead { color: var(--ink); font-size: clamp(21px, 2.3vw, 29px); line-height: 1.45; font-weight: 650; letter-spacing: -0.025em; margin-top: 0; }
.facts-card { background: var(--soft); border: 1px solid #e4ebf1; border-radius: var(--radius); padding: 8px 24px; box-shadow: var(--shadow); }
.fact { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid #dde6ee; }
.fact:last-child { border-bottom: 0; }
.fact span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.fact strong { text-align: right; font-size: 14px; }

.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.skill-card { background: var(--white); padding: 26px; border: 1px solid #e0e8ef; border-radius: var(--radius); min-height: 220px; box-shadow: 0 10px 30px rgba(15,35,55,0.04); transition: .25s ease; }
.skill-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #cfe2ed; }
.skill-number { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.skill-card h3 { margin: 42px 0 10px; font-size: 20px; }
.skill-card p { color: var(--muted); margin: 0; font-size: 14px; }
.stack-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.stack-strip span { background: #eaf2f7; color: #425467; border: 1px solid #dbe8f0; padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }

.timeline { position: relative; max-width: 1000px; }
.timeline::before { content: ""; position: absolute; left: 170px; top: 9px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 60px; padding-bottom: 54px; }
.timeline-marker { position: absolute; left: 164px; top: 7px; width: 13px; height: 13px; border-radius: 50%; background: var(--white); border: 3px solid var(--blue); z-index: 1; }
.timeline-date { color: var(--muted); font-size: 12px; font-weight: 750; padding-top: 3px; }
.timeline-content { padding-left: 0; }
.role-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 15px; }
.role-header h3 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.role-header p { color: var(--blue); font-size: 13px; font-weight: 700; margin: 4px 0 0; }
.tag { color: #0e7e65; background: #e0f8f1; border: 1px solid #bdebdc; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.timeline-content ul { margin: 0; padding-left: 18px; }
.timeline-content li { color: #59677a; margin-bottom: 9px; padding-left: 5px; }
.timeline-content li::marker { color: var(--blue); }

.work-section { background: linear-gradient(145deg, #08111f 0%, #0b1828 60%, #0c1c2e 100%); }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.work-card { min-height: 330px; padding: 30px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.09); background: rgba(255,255,255,0.035); display: flex; flex-direction: column; transition: .25s ease; }
.work-card:hover { transform: translateY(-5px); border-color: rgba(76,198,255,0.3); background: rgba(255,255,255,0.055); }
.work-card-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.work-index { color: var(--blue-2); font-weight: 800; font-size: 12px; letter-spacing: .15em; }
.work-domain { color: #788da3; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.work-card h3 { margin: 68px 0 14px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.work-card p { color: #9aafc3; margin: 0; }
.work-tech { margin-top: auto; padding-top: 28px; display: flex; gap: 7px; flex-wrap: wrap; }
.work-tech span { color: #a9bdd0; border: 1px solid rgba(255,255,255,0.1); border-radius: 999px; padding: 5px 9px; font-size: 10px; }

.education-card { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 32px; background: var(--white); border: 1px solid #e0e8ef; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 1000px; }
.education-year { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.education-card h3 { font-size: 24px; margin: 7px 0 2px; }
.education-card p { color: var(--muted); margin: 0; }
.degree { text-align: right; color: var(--muted); }
.degree strong { color: var(--ink); }

.contact-section { padding-top: 108px; padding-bottom: 108px; }
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.contact-wrap > div:first-child > p:last-child { color: var(--muted); font-size: 16px; }
.contact-actions { display: grid; gap: 12px; }
.contact-link { display: grid; gap: 2px; padding: 19px 20px; border-radius: 13px; background: var(--soft); border: 1px solid #e0e8ef; transition: .2s ease; overflow-wrap: anywhere; }
.contact-link:hover, .contact-link:focus-visible { transform: translateX(5px); border-color: #bfdfef; background: #edf7fc; }
.contact-link span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.contact-link strong { font-size: 14px; }

.footer { padding: 24px clamp(32px, 6vw, 96px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #7a8796; font-size: 11px; }
.footer p { margin: 0; }
.footer div { display: flex; gap: 16px; }
.footer a:hover, .footer a:focus-visible { color: var(--blue); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }

:focus-visible { outline: 3px solid rgba(20,157,221,.35); outline-offset: 3px; }

@media (max-width: 1180px) {
  :root { --sidebar: 260px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 110px; padding-bottom: 110px; }
  .code-card { justify-self: start; width: min(100%, 640px); }
  .skills-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 920px) {
  :root { --sidebar: 280px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 16px 0 40px rgba(0,0,0,.2); }
  body.menu-open .sidebar { transform: translateX(0); }
  .menu-toggle { display: block; }
  .site-main { margin-left: 0; }
  .about-grid, .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .timeline::before { left: 10px; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; padding-left: 40px; }
  .timeline-marker { left: 4px; }
  .work-grid { grid-template-columns: 1fr; }
  .education-card { align-items: flex-start; }
}

@media (max-width: 640px) {
  .section { padding: 76px 22px; }
  .hero { padding: 100px 22px 90px; gap: 44px; }
  .hero h2 { font-size: clamp(42px, 13vw, 62px); }
  .hero-meta { gap: 20px; }
  .code-card { display: none; }
  .scroll-cue { left: 22px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: auto; }
  .skill-card h3 { margin-top: 25px; }
  .role-header { display: block; }
  .tag { display: inline-block; margin-top: 10px; }
  .education-card { display: grid; }
  .degree { text-align: left; }
  .footer { align-items: flex-start; flex-direction: column; padding: 22px; }
}

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