/* ==========================================================================
   Reset & base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-base: #0E1525;
  --bg-alt: #0A111F;
  --surface: #172033;
  --surface-hover: #1F2A40;
  --border: #2A3654;
  --border-strong: #3A4870;

  --text-primary: #E8ECF4;
  --text-secondary: #9AA7C2;
  --text-muted: #6B7894;

  --accent: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --success: #10B981;

  --max-width: 1200px;
  --section-pad: clamp(64px, 9vw, 112px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --header-h: 68px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(0, 0, 0, 0.4);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--accent-hover);
}

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

p {
  margin: 0;
}

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

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
  position: relative;
}

.section-alt {
  background: var(--bg-alt);
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-intro {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 48px;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(14, 21, 37, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(14, 21, 37, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--text-primary);
}

.brand-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-list a:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.nav-list .nav-cta {
  margin-left: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.nav-list .nav-cta:hover {
  background: var(--accent-hover);
  color: #fff;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.lang-switch a {
  padding: 8px 8px;
  color: var(--text-muted);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.lang-switch a:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.lang-switch a.is-active {
  color: var(--text-primary);
}

.lang-switch > span {
  color: var(--border-strong);
  user-select: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease, color 150ms ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-large {
  padding: 16px 28px;
  font-size: 16px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-top: calc(var(--section-pad) + 24px);
  padding-bottom: var(--section-pad);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
    radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.07), transparent 55%),
    var(--bg-base);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), transparent 80%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  position: relative;
}

.hero-content {
  max-width: 640px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-tagline {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 580px;
}

.hero-tagline strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-sub strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.location-chip svg {
  color: var(--accent);
}

.hero-photo-wrap {
  display: flex;
  justify-content: center;
}

.hero-photo {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card-hover);
  background: var(--surface);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 220deg, transparent, var(--accent-soft), transparent 60%);
  z-index: -1;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  gap: 28px;
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 820px;
}

.about-grid strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Experience timeline
   ========================================================================== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 28px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.timeline-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.timeline-logo {
  width: 88px;
  height: 88px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timeline-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.timeline-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-years {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.timeline-employer {
  font-size: 22px;
  color: var(--text-primary);
}

.timeline-parent {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 17px;
}

.timeline-role {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
}

.timeline-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.65;
}

.timeline-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Projects
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.project-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-alt);
}

.project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 21, 37, 0) 50%, rgba(14, 21, 37, 0.55) 100%);
  pointer-events: none;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.project-card:hover .project-image img {
  transform: scale(1.04);
}

.project-body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-title {
  font-size: 20px;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-role {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.project-desc {
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Media (embedded video card)
   ========================================================================== */
.media-item {
  display: grid;
  gap: 24px;
}

.media-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.media-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-meta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
}

.media-channel {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.media-title {
  font-size: 20px;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 10px;
}

.media-translit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.media-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.media-desc a {
  font-weight: 600;
}

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.skills-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}

.skills-heading {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.skill-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(42, 54, 84, 0.4);
}

.skill-list li:last-child {
  border-bottom: none;
}

.skill-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-2px);
}

.skill-meta {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ==========================================================================
   Education & Certifications
   ========================================================================== */
.edu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
}

.edu-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}

.edu-heading {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.edu-list li {
  padding: 18px 0;
  border-bottom: 1px solid rgba(42, 54, 84, 0.4);
}

.edu-list li:last-child {
  border-bottom: none;
}

.edu-degree {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.edu-school {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.edu-detail {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.cert-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(42, 54, 84, 0.4);
}

.cert-list li:last-child {
  border-bottom: none;
}

.cert-name {
  flex: 1;
}

.cert-name em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
}

.cert-year {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
}

/* ==========================================================================
   Achievements / stat tiles
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: left;
  transition: border-color 200ms ease, transform 200ms ease;
}

.stat-tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat-value {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Contact CTA
   ========================================================================== */
.section-cta {
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.16), transparent 60%),
    var(--bg-alt);
  text-align: center;
}

.contact-inner {
  max-width: 640px;
}

.contact-title {
  font-size: clamp(32px, 4vw, 44px);
  margin-bottom: 16px;
}

.contact-sub {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.contact-location {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.contact-location svg {
  color: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-base);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy,
.footer-link {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.footer-link a {
  color: var(--text-secondary);
}

.footer-link a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Reveal-on-scroll animation
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-tagline,
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-row {
    justify-content: center;
  }
  .hero-photo-wrap {
    order: -1;
  }
  .hero-photo {
    width: 240px;
    height: 240px;
  }

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

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

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

@media (max-width: 720px) {
  :root {
    --header-h: 60px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-base);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 200ms ease, opacity 200ms ease;
  }

  .nav.is-open .nav-list {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list a {
    padding: 14px 12px;
    font-size: 15px;
    border-radius: var(--radius-sm);
  }

  .nav-list .nav-cta {
    margin-top: 8px;
    margin-left: 0;
    text-align: center;
  }

  .lang-switch {
    margin-left: 0;
    padding-left: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-left: none;
    border-top: 1px solid var(--border);
    justify-content: flex-start;
  }
  .lang-switch a {
    padding: 10px 12px;
    font-size: 14px;
  }

  .timeline-item {
    grid-template-columns: 64px 1fr;
    gap: 18px;
    padding: 22px 22px;
  }

  .timeline-logo {
    width: 64px;
    height: 64px;
    padding: 8px;
  }

  .timeline-employer {
    font-size: 19px;
  }

  .timeline-parent {
    display: block;
    font-size: 14px;
    margin-top: 2px;
  }

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

  .skills-column,
  .edu-block {
    padding: 24px;
  }

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

  .cert-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 460px) {
  .brand-name {
    display: none;
  }

  .hero-photo {
    width: 200px;
    height: 200px;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .location-chip {
    justify-content: center;
  }
}
