/* ─── Reset ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter Tight', sans-serif;
  background: transparent;
  color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ─── CSS Variables ──────────────────────────────── */
:root {
  --blue-light: #6699CC;
  --blue-mid: #4381C1;
  --blue-dark: #2a5a9e;
  --red: #B60109;
  --white: #ffffff;
  --off-white: rgba(255, 255, 255, 0.55);
  --muted: rgba(255, 255, 255, 0.32);
  --border: rgba(255, 255, 255, 0.07);
  --border-blue: rgba(67, 129, 193, 0.3);
  --bg-0: transparent;
  --bg-1: rgba(0, 0, 0, 0.55);
  --bg-2: rgba(0, 0, 0, 0.65);
  --bg-3: rgba(0, 0, 0, 0.6);
  --section-pad-x: 150px;
  --section-pad-y: 72px;
  --section-pad: var(--section-pad-y) var(--section-pad-x);
  --hero-pad-y: 25vh;
}

/* ─── Navigation ─────────────────────────────────── */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 16px 0;
  background: transparent;
}

.nav-pill {
  display: flex;
  gap: 4px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 40px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.3);
}

.nav-pill a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  padding: 5px 16px;
  border-radius: 30px;
  transition: color 0.2s, background 0.2s;
}

.nav-pill a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-pill a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ─── Hero ───────────────────────────────────────── */
#about {
  background: var(--bg-0);
  padding: var(--hero-pad-y) var(--section-pad-x);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

.hero-left {
  max-width: 560px;
  text-align: center;
}

.hero-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-mid);
  flex-shrink: 0;
}

.hero-tag span {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

.hero-bio {
  font-size: 15px;
  color: var(--off-white);
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto;
}

.hero-image {
  flex-shrink: 0;
  width: 280px;
  overflow: hidden;
  margin-right: 40px;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Photo Strip ────────────────────────────────── */
.photo-strip {
  width: 100%;
  height: auto;
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}

.photo-strip img {
  width: calc(100% - 2 * var(--section-pad-x));
  height: auto;
  object-fit: initial;
  display: block;
  margin: 0 auto;
}

/* ─── Section base ───────────────────────────────── */
.section {
  padding: var(--section-pad);
}

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

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

.section-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

/* ─── Timeline ───────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 700px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: rgba(67, 129, 193, 0.3);
}

.tl-item {
  position: relative;
  margin-bottom: 32px;
}

.tl-item:last-child {
  margin-bottom: 0;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-mid);
  box-shadow: 0 0 0 4px rgba(67, 129, 193, 0.15);
}

.tl-date {
  font-size: 10px;
  color: var(--blue-light);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.tl-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}

.tl-org {
  font-size: 12px;
  color: var(--muted);
}

.tl-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  background: rgba(67, 129, 193, 0.1);
  color: var(--blue-light);
  border: 0.5px solid var(--border-blue);
  border-radius: 20px;
  padding: 3px 10px;
  margin-top: 8px;
  letter-spacing: 0.05em;
}

/* ─── Skills ─────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.skill-card {
  background: rgba(255, 255, 255, 0.025);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 20px 18px;
  transition: border-color 0.2s;
}

.skill-card:hover {
  border-color: rgba(67, 129, 193, 0.4);
}

.skill-icon {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--blue-light);
}

.skill-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.skill-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.skills-subsection {
  margin-bottom: 40px;
}

.skills-subsection:last-child {
  margin-bottom: 0;
}

.skills-sublabel {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 16px;
}

.skills-other {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-chip {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
}

.skill-chip.blue {
  color: var(--blue-light);
  border-color: var(--border-blue);
  background: rgba(67, 129, 193, 0.06);
}

/* ─── Projects ───────────────────────────────────── */
.projects-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.projects-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.projects-row {
  display: flex;
  gap: 40px;
  min-width: max-content;
}

.project-card {
  position: relative;
  width: 221px;
  height: 320px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: #161616;
  border-radius: 0;
}

.project-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  filter: brightness(0.6) grayscale(30%);
}

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

.project-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  padding: 16px 18px;
  min-height: 110px;
}

.project-card:hover .project-card-overlay {
  background: rgba(0, 0, 0, 0.75);
}

.project-tag {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.project-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.project-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.project-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}

.project-card:hover .project-arrow {
  background: var(--blue-light);
  transform: translateX(2px);
}

.project-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.projects-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Contact ────────────────────────────────────── */
#contact {
  /* background: var(--bg-3); */
  padding: 48px 80px;
  border-top: 1px solid rgba(67, 129, 193, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.contact-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--blue-light);
}

.contact-link svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue-mid);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.cv-btn {
  background: var(--blue-mid);
  color: #fff;
  font-family: 'Inter Tight', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 11px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.cv-btn:hover {
  background: var(--blue-dark);
}

/* ─── Scroll-reveal ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 860px) {
  :root {
    --section-pad: 48px 32px;
  }

  #about {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .hero-image {
    width: 100%;
    height: auto;
    margin-right: 0;
  }

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

  #contact {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-links {
    gap: 20px;
  }
}

@media (max-width: 560px) {
  :root {
    --section-pad: 40px 20px;
  }

  .nav-pill {
    gap: 0;
  }

  .nav-pill a {
    padding: 5px 10px;
    font-size: 11px;
  }

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