:root {
  --bg: #0a0e17;
  --bg-soft: #0d1320;
  --surface: #131b2b;
  --surface-2: #182234;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e7eef8;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --accent-glow: rgba(34, 211, 238, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 60rem at 15% -10%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(45rem 45rem at 100% 0%, rgba(34, 211, 238, 0.12), transparent 55%);
  pointer-events: none;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  flex: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #04121a;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 23, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 14, 23, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 0.82rem;
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px -6px var(--accent-glow);
}

.brand-name {
  font-size: 0.98rem;
}

.nav {
  display: flex;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav a {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav a.is-active {
  color: var(--accent);
}

.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.lang button.is-active {
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  align-items: center;
  gap: 3.5rem;
  padding-block: 5.5rem 4.5rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.1rem);
  background: linear-gradient(180deg, #fff 30%, #9fb4cf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  margin-top: 0.6rem;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  color: var(--accent);
}

.hero-tagline {
  margin-top: 1.1rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}

.btn-primary {
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px -12px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px var(--accent-glow);
  filter: brightness(1.05);
}

.hero-loc {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-loc svg {
  color: var(--accent);
}

.hero-photo {
  justify-self: center;
  position: relative;
  width: min(320px, 72vw);
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0.25;
  filter: blur(26px);
  z-index: -1;
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
}

/* Sections */
.section {
  padding-block: 3.6rem;
  scroll-margin-top: 84px;
}

.section-label {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin-bottom: 1.9rem;
}

.lead {
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.06rem;
}

/* Timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 1.25rem;
  padding-left: 1.6rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2) 45%, transparent);
  opacity: 0.5;
}

.timeline-item,
.edu-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 1.7rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transform: translateX(-1px);
}

.timeline-item:hover,
.edu-card:hover,
.skill-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline-head h3 {
  font-size: 1.12rem;
}

.timeline-period {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.timeline-org {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}

.timeline-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.5rem;
}

.timeline-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.skill-card h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tags li {
  font-size: 0.88rem;
  padding: 0.36rem 0.78rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.tags li:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: var(--accent);
}

/* Contact */
.contact-card {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    radial-gradient(30rem 20rem at 50% 0%, rgba(34, 211, 238, 0.1), transparent 70%),
    var(--surface);
}

.contact-card h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  margin-bottom: 0.8rem;
}

.contact-card .lead {
  margin-inline: auto;
}

.contact-actions {
  margin-top: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-block: 1.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    padding-block: 3.4rem 2.6rem;
    text-align: left;
  }

  .hero-photo {
    order: -1;
    width: min(220px, 60vw);
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
  }

  .brand-name {
    display: none;
  }

  .timeline {
    padding-left: 1.2rem;
  }

  .timeline-item::before {
    left: -1.2rem;
  }

  .timeline-item,
  .edu-card,
  .skill-card {
    padding: 1.2rem;
  }

  .contact-card {
    padding: 2.2rem 1.2rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
