:root {
  --bg: #07101f;
  --bg-soft: #0f172a;
  --panel: rgba(20, 35, 58, 0.7);
  --panel-solid: #111f35;
  --line: rgba(148, 163, 184, 0.16);
  --line-blue: rgba(56, 189, 248, 0.28);
  --blue: #2563eb;
  --cyan: #38bdf8;
  --amber: #f59e0b;
  --white: #f8fafc;
  --text: #cbd5e1;
  --muted: #94a3b8;
  --font-body: "Inter", sans-serif;
  --font-heading: "Space Grotesk", sans-serif;
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 85% 6%, rgba(37, 99, 235, 0.16), transparent 26rem),
    radial-gradient(circle at 8% 52%, rgba(56, 189, 248, 0.08), transparent 30rem),
    linear-gradient(180deg, #07101f 0%, #091425 54%, #07101f 100%);
}
.site-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 112px 0; scroll-margin-top: 78px; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; color: var(--white); font-family: var(--font-heading); line-height: 1.12; }
h1 { max-width: 740px; font-size: clamp(3.4rem, 6vw, 6rem); letter-spacing: -0.075em; }
h2 { font-size: clamp(2.25rem, 4vw, 3.65rem); letter-spacing: -0.065em; }
h3 { font-size: 1.18rem; }
h1 span, h2 span { color: var(--cyan); }
p { margin-top: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: rgba(7, 16, 31, 0.7);
  backdrop-filter: blur(18px);
  transition: border-color 250ms ease, box-shadow 250ms ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 10px 35px rgba(0, 0, 0, 0.16); }
.navbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--white); font-family: var(--font-heading); font-weight: 700; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line-blue); border-radius: 11px; color: var(--cyan); background: rgba(56, 189, 248, 0.08); font-size: 0.83rem; letter-spacing: -0.04em; }
.brand-name { letter-spacing: -0.04em; }
.nav-links { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.nav-links a { transition: color 200ms ease; }
.nav-links a:hover { color: var(--white); }
.nav-links .nav-cta { padding: 9px 14px; border: 1px solid var(--line-blue); border-radius: 20px; color: var(--cyan); }
.nav-toggle { display: none; border: 0; color: var(--white); background: none; cursor: pointer; }

.hero { min-height: calc(100vh - 76px); display: grid; align-items: center; padding: 76px 0 86px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.75fr); align-items: center; gap: 64px; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.12); }
.hero-role { max-width: 750px; margin: 22px 0 14px; color: var(--white); font-family: var(--font-heading); font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -0.035em; }
.hero-role strong { color: var(--cyan); }
.hero-summary { max-width: 720px; margin-bottom: 12px; color: var(--text); font-size: 1.02rem; }
.human-note { margin: 0; color: var(--muted); font-size: 0.95rem; }
#typing-text { color: var(--cyan); }
.typing-cursor { display: inline-block; width: 2px; height: 1em; margin-left: 4px; vertical-align: -2px; background: var(--cyan); animation: blink 800ms step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border: 1px solid transparent; border-radius: 12px; font-size: 0.82rem; font-weight: 700; transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, color 200ms ease; }
.button:hover { transform: translateY(-3px); }
.button-primary { color: var(--white); background: var(--blue); box-shadow: 0 12px 28px rgba(37, 99, 235, 0.26); }
.button-primary:hover { background: #1d4ed8; }
.button-ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, 0.025); }
.button-ghost:hover { border-color: var(--line-blue); color: var(--cyan); }
.button-subtle { color: var(--cyan); }
.hero-facts { display: flex; gap: 26px; margin-top: 48px; }
.hero-facts div { display: grid; gap: 1px; padding-left: 13px; border-left: 1px solid var(--line-blue); }
.hero-facts strong { color: var(--white); font-family: var(--font-heading); font-size: 1.1rem; }
.hero-facts span { color: var(--muted); font-size: 0.73rem; }

.infra-panel, .contact-card, .value-wrap {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30, 52, 84, 0.68), rgba(12, 25, 45, 0.75));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.infra-panel { position: relative; overflow: hidden; padding: 19px; }
.infra-panel::before { position: absolute; width: 180px; height: 180px; top: -80px; right: -40px; content: ""; border-radius: 50%; background: rgba(56, 189, 248, 0.13); filter: blur(36px); }
.panel-top, .metric-head, .panel-footer, .project-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-kicker { margin: 0; color: var(--cyan); font-size: 0.63rem; font-weight: 700; letter-spacing: 0.16em; }
.panel-top h2 { margin-top: 5px; font-size: 1.14rem; letter-spacing: -0.04em; }
.live-pill { display: flex; align-items: center; gap: 6px; color: #86efac; font-size: 0.66rem; font-weight: 700; }
.live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 12px #4ade80; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.metric-card { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 16, 31, 0.48); }
.metric-head { color: var(--muted); font-size: 0.67rem; }
.metric-icon { color: var(--cyan); font-size: 1rem; font-style: normal; }
.metric-card strong { display: block; margin: 8px 0 8px; color: var(--white); font-size: 0.84rem; }
.bar { height: 3px; overflow: hidden; border-radius: 4px; background: rgba(148, 163, 184, 0.14); }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.network-map { position: relative; height: 220px; margin: 15px 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 16, 31, 0.42); }
.network-map svg { width: 100%; height: 100%; fill: none; stroke: rgba(56, 189, 248, 0.22); stroke-dasharray: 4 7; }
.node { position: absolute; z-index: 2; display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid rgba(56, 189, 248, 0.28); border-radius: 12px; color: var(--cyan); background: #12233c; font-family: var(--font-heading); font-size: 0.65rem; font-weight: 700; box-shadow: 0 7px 15px rgba(0, 0, 0, 0.16); }
.node-main { top: calc(50% - 27px); left: calc(50% - 27px); width: 54px; height: 54px; color: var(--white); background: var(--blue); }
.node-a { top: 18px; left: 20px; }.node-b { top: 18px; right: 20px; }.node-c { bottom: 18px; left: 20px; }.node-d { right: 20px; bottom: 18px; }
.panel-footer { flex-wrap: wrap; justify-content: flex-start; color: var(--muted); font-size: 0.6rem; }
.panel-footer span { display: flex; align-items: center; gap: 5px; }
.panel-footer i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }

.split-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 70px; }
.section-heading { max-width: 750px; margin-bottom: 44px; }
.section-heading > p:last-child { max-width: 680px; margin: 14px 0 0; color: var(--muted); }
.section-heading.centered { margin-inline: auto; text-align: center; }
.section-heading.centered > p:last-child { margin-inline: auto; }
.about-copy { padding-left: 28px; border-left: 1px solid var(--line-blue); }
.about-copy p { margin-bottom: 18px; }
.focus-section, .education-section, .personal-section { border-block: 1px solid rgba(148, 163, 184, 0.07); background: rgba(15, 23, 42, 0.34); }
.focus-grid, .personal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.focus-card, .skill-group, .project-card, .personal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 31, 53, 0.6);
  transition: transform 250ms ease, border-color 250ms ease, background 250ms ease;
}
.focus-card:hover, .skill-group:hover, .project-card:hover, .personal-card:hover { transform: translateY(-5px); border-color: var(--line-blue); background: rgba(20, 40, 67, 0.76); }
.focus-card { min-height: 215px; padding: 24px; }
.card-icon, .personal-card > span { color: var(--cyan); font-family: var(--font-heading); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; }
.focus-card h3 { margin: 37px 0 10px; }
.focus-card p, .personal-card p, .project-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.65; }
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.skill-group { padding: 22px; }
.skill-group h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 1rem; }
.skill-group h3 span { color: var(--cyan); font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span { padding: 5px 9px; border: 1px solid rgba(148, 163, 184, 0.13); border-radius: 20px; color: var(--text); background: rgba(148, 163, 184, 0.045); font-size: 0.71rem; font-weight: 600; }

.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.timeline::before { position: absolute; top: 19px; right: 8%; left: 8%; height: 1px; content: ""; background: var(--line-blue); }
.timeline-card { position: relative; padding-top: 50px; }
.timeline-dot { position: absolute; top: 12px; left: 14px; width: 15px; height: 15px; border: 3px solid var(--bg-soft); border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 20px rgba(56, 189, 248, 0.42); }
.timeline-card p { margin-bottom: 8px; color: var(--cyan); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.timeline-card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.timeline-card > span:last-child { color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.timeline-card.accent .timeline-dot { background: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 20px rgba(245, 158, 11, 0.4); }
.timeline-card.accent p { color: var(--amber); }
.project-heading { display: flex; max-width: none; align-items: end; justify-content: space-between; gap: 20px; }
.text-link { color: var(--cyan); font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.project-card { display: flex; min-height: 255px; flex-direction: column; padding: 23px; }
.project-featured { grid-row: span 2; min-height: 524px; justify-content: end; overflow: hidden; background: linear-gradient(155deg, rgba(37, 99, 235, 0.22), rgba(17, 31, 53, 0.68)); }
.project-featured::before { display: block; flex: 1; margin: -4px -4px 26px; border: 1px solid rgba(56, 189, 248, 0.18); border-radius: 12px; content: ""; background: radial-gradient(circle, rgba(56, 189, 248, 0.65) 0 2px, transparent 3px) 0 0 / 28px 28px, linear-gradient(135deg, transparent 49.5%, rgba(56, 189, 248, 0.2) 50%, transparent 50.5%); opacity: 0.55; }
.project-type { color: var(--cyan); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.project-number { color: rgba(148, 163, 184, 0.35); font-family: var(--font-heading); font-weight: 700; }
.project-card h3 { margin: 26px 0 9px; font-size: 1.34rem; }
.project-card .chips { margin-top: 18px; }
.project-links { display: flex; gap: 16px; margin-top: auto; padding-top: 24px; }
.project-links a { color: var(--cyan); font-size: 0.76rem; font-weight: 700; }

.value-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 44px; padding: 34px; }
.value-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.value-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 16, 31, 0.28); }
.value-grid strong { color: var(--cyan); font-family: var(--font-heading); font-size: 0.75rem; }
.value-grid p { margin: 16px 0 0; color: var(--text); font-size: 0.86rem; }
.personal-card { min-height: 170px; padding: 21px; }
.personal-card h3 { margin: 23px 0 8px; }
.contact-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding: 42px; }
.contact-card p:last-child { max-width: 690px; margin: 16px 0 0; color: var(--muted); }
.contact-actions { max-width: 330px; justify-content: flex-end; margin-top: 0; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; min-height: 92px; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 0.76rem; }
.footer-inner div:first-child { display: grid; }
.footer-inner strong { color: var(--white); font-family: var(--font-heading); font-size: 0.95rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 14px; }
.footer-links a:hover { color: var(--cyan); }
.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 10; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line-blue); border-radius: 12px; color: var(--cyan); background: rgba(15, 23, 42, 0.8); box-shadow: var(--shadow); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 200ms ease, transform 200ms ease; backdrop-filter: blur(14px); }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .nav-toggle { display: grid; gap: 5px; padding: 8px; }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform 200ms ease, opacity 200ms ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links { position: absolute; top: 76px; right: 0; left: 0; display: grid; max-height: 0; overflow: hidden; padding-inline: 20px; background: rgba(7, 16, 31, 0.97); transition: max-height 300ms ease, padding 300ms ease; }
  .nav-links.open { max-height: 520px; padding-block: 18px 22px; border-bottom: 1px solid var(--line); }
  .nav-links a { padding: 4px 0; }
  .nav-links .nav-cta { width: fit-content; padding-inline: 14px; }
  .hero-grid { grid-template-columns: 1fr; }
  .infra-panel { width: min(100%, 600px); }
  .split-layout, .value-wrap, .contact-card { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { display: none; }
  .contact-actions { max-width: none; justify-content: flex-start; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 28px, 1160px); }
  .section { padding: 84px 0; }
  h1 { font-size: clamp(3rem, 16vw, 4.3rem); }
  .hero { padding-top: 60px; }
  .hero-role { font-size: 1.1rem; }
  .hero-actions .button { flex-grow: 1; }
  .hero-facts { gap: 13px; margin-top: 38px; }
  .hero-facts div { padding-left: 9px; }
  .hero-facts strong { font-size: 0.94rem; }
  .hero-facts span { font-size: 0.63rem; }
  .metric-grid, .skills-grid, .focus-grid, .projects-grid, .personal-grid, .value-grid, .timeline { grid-template-columns: 1fr; }
  .network-map { height: 190px; }
  .node { width: 40px; height: 40px; }
  .node-main { width: 49px; height: 49px; }
  .about-copy { padding-left: 17px; }
  .project-heading { display: block; }
  .text-link { display: inline-block; margin-top: 20px; }
  .project-featured { min-height: 460px; }
  .value-wrap, .contact-card { padding: 24px; }
  .contact-actions .button { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; justify-content: center; padding: 22px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
