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

:root {
  --black: #000000;
  --white: #ffffff;
  --gray: #9b9b9b;
  --nav-height: 64px;

  /* spacing tokens — everything uses these */
  --page-x: 80px;
  --section-gap: 120px;
  --col-gap: 80px;
  --item-gap: 48px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

nav a {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
}

nav a:hover { opacity: 0.6; }
nav a.active { opacity: 1; }

/* ── SECTION BASE ── */
section {
  scroll-margin-top: var(--nav-height);
  padding: var(--section-gap) var(--page-x);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

section + section {
  padding-top: 0;
  margin-top: 0;
}

/* ── SECTION TITLE ── */
.section-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 56px;
  flex-shrink: 0;
}

/* ── HOME ── */
#home {
  min-height: 100vh;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--col-gap);
  position: relative;
}

/* scroll-down arrow */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  animation: scrollBounce 1.8s ease-in-out infinite;
}

.scroll-hint:hover {
  color: rgba(255,255,255,0.9);
}

.scroll-hint__arrow {
  width: 36px;
  height: 36px;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.45; }
  50%       { transform: translateX(-50%) translateY(10px); opacity: 1;   }
}

/* left: photo column */
.home-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  padding: var(--section-gap) 0;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 16px;
  font-weight: 400;
  color: var(--white);
  opacity: 0.6;
  letter-spacing: 0.01em;
}

.hero-photo-wrap { flex: 0 0 auto; }

.hero-photo {
  height: 40vh;
  max-height: 340px;
  width: auto;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 12px;
}

/* right: two card columns */
.home-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}


.stat-card {
  background: rgba(255,255,255,0.03);
  border: 0.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 28px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  transition: border-color 0.25s ease;
  min-height: 160px;
}

.stat-card:hover { border-color: rgba(255,255,255,0.18); }

.stat-number {
  font-size: 44px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  width: 60px;
  text-align: center;
}

.stat-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-bullets li {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.5;
  padding-left: 12px;
  position: relative;
}

.stat-bullets li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.2);
  font-size: 10px;
}

/* ── SKILLS ── */
#skills,
#skills-2 {
  flex-direction: column;
  justify-content: flex-start;
}

.skills-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  align-items: start;
}

.skills-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
}

.skills-logo img {
  width: 100%;
  max-width: 360px;
  object-fit: contain;
  opacity: 0.9;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: var(--item-gap);
}

.skill-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.skill-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray);
  min-width: 32px;
  padding-top: 6px;
  flex-shrink: 0;
  letter-spacing: 0.06em;
}

.skill-content { flex: 1; }

.skill-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.2;
}

.skill-desc {
  font-size: 15px;
  font-weight: 400;
  color: var(--gray);
  line-height: 1.6;
}

/* ── PORTFOLIO ── */
#portfolio {
  align-items: center;
  justify-content: center;
  gap: 0;
}

.deck-container {
  display: flex;
  align-items: center;
  gap: 48px;
  width: 100%;
  justify-content: center;
}

.deck {
  position: relative;
  width: 520px;
  height: 340px;
}

.deck-card {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(.22,.68,0,1.2), opacity 0.3s ease;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.deck-card[data-state="active"] {
  transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  z-index: 3;
  opacity: 1;
}

.deck-card[data-state="next"] {
  transform: translateX(20px) translateY(14px) rotate(2deg) scale(0.97);
  z-index: 2;
  opacity: 0.8;
}

.deck-card[data-state="back"] {
  transform: translateX(38px) translateY(26px) rotate(4deg) scale(0.94);
  z-index: 1;
  opacity: 0.55;
}

.deck-card[data-state="hidden"] {
  transform: translateX(-40px) scale(0.9);
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}

.deck-card__bg { position: absolute; inset: 0; }

.deck-card__label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deck-card__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
}

.deck-card__sub {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.03em;
}

.deck-arrow {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.deck-arrow:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

/* ── EXPANDED OVERLAY ── */
.exp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.exp-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.exp-overlay__close {
  position: absolute;
  top: 32px; right: 40px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.exp-overlay__close:hover { opacity: 1; }

.exp-overlay__inner {
  display: flex;
  gap: var(--col-gap);
  width: 90%;
  max-width: 1100px;
  align-items: center;
}

.exp-media {
  flex: 0 0 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.media-track {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-track .media-placeholder {
  font-size: 14px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

.media-caption {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  min-height: 20px;
}

.media-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.media-arrow--left  { left: -20px; }
.media-arrow--right { right: -20px; }
.media-arrow:hover  { background: rgba(255,255,255,0.15); }

.exp-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exp-info__title {
  font-size: 40px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

.exp-info__role {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exp-info__desc {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
}

.exp-info__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.exp-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 4px 10px;
  letter-spacing: 0.04em;
}

/* ── STUDIES ── */
#studies { justify-content: flex-start; }

.study-entry {
  display: flex;
  gap: var(--col-gap);
  align-items: flex-start;
}

.study-year {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 6px;
  min-width: 110px;
}

.study-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.study-degree {
  font-size: 30px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.study-school {
  font-size: 15px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 10px;
}

.study-logo {
  height: 22px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
}

.study-honors {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  font-style: italic;
}

/* ── CONTACT ── */
#contact { justify-content: flex-start; }

.contact-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
}

.contact-tagline {
  font-size: 17px;
  color: var(--gray);
  margin-bottom: 48px;
  letter-spacing: 0.01em;
}

.contact-links {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 48px;
}

.contact-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.07);
  text-decoration: none;
  transition: opacity 0.2s ease;
  gap: 24px;
}

a.contact-item:hover { opacity: 0.6; }
.contact-item.no-link { cursor: default; }

.contact-label {
  font-size: 11px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  min-width: 90px;
}

.contact-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  text-align: right;
}

.cv-button {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 14px 36px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cv-button:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.5);
}

.deck-caption {
  font-size: 13px;
  font-style: italic;
  color: var(--gray);
  text-align: center;
  margin-bottom: 20px;
  opacity: 0.7;
}

/* ── STUDIES CENTERED ── */
#studies {
  justify-content: center;
  align-items: center;
}

#studies .section-title {
  align-self: center;
}

#studies .study-entry {
  justify-content: center;
}

/* ── TIMELINE ── */
#studies {
  justify-content: flex-start;
  align-items: flex-start;
}

#studies .section-title {
  align-self: flex-start;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.timeline-year {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.timeline-line {
  display: flex;
  align-items: center;
  gap: 0;
  width: 200px;
}

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

.timeline-track {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--gray) 0px,
    var(--gray) 4px,
    transparent 4px,
    transparent 10px
  );
}

.study-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 2px;
}

.exp-info__desc {
  text-align: justify;
}

.exp-overlay__project-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 10;
}

.exp-overlay__project-arrow:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

.exp-overlay__project-arrow--left  { left: 24px; }
.exp-overlay__project-arrow--right { right: 24px; }

.skill-name--with-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-inline-logo {
  height: 20px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  flex-shrink: 0;
}

.stat-utad-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  flex-shrink: 0;
}



















.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  width: 100%;
}

.stat-grid .stat-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.stat-grid .stat-card:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.stat-grid .stat-card:nth-child(3) {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

.stat-logo {
  height: 44px;
  width: 60px;
  object-fit: contain;
  object-position: center;
  opacity: 0.85;
}

.stat-note {
  font-size: 11px;
  font-style: italic;
  color: var(--gray);
  margin-bottom: 4px;
  display: block;
  text-align: center;
}

.stat-label--sm {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.stat-label--lg {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

/* ── MOBILE ── */
@media (max-width: 767px) {
  :root {
    --page-x: 20px;
    --section-gap: 60px;
    --col-gap: 20px;
    --item-gap: 28px;
  }

  /* Nav */
  nav {
    gap: 0;
    justify-content: space-around;
    padding: 0 8px;
  }
  nav a { font-size: 13px; }

  /* Section title */
  .section-title { font-size: 28px; margin-bottom: 28px; }

  /* Home — stack vertically */
  #home {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding-bottom: 72px;
    gap: 32px;
  }

  .home-left {
    padding: var(--section-gap) 0 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 24px;
    width: 100%;
  }

  .hero-title { font-size: 36px; }
  .hero-sub   { font-size: 14px; }

  .hero-photo {
    height: auto;
    max-height: none;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }

  .home-right { width: 100%; min-width: 0; }

  .stat-grid { min-width: 0; }

  .stat-card { min-width: 0; }

  .timeline-line { width: auto; flex: 1; min-width: 0; }

  .home-right {
    width: 100%;
    justify-content: flex-start;
    align-items: flex-start;
  }

  /* Stat cards — single column */
  .stat-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    width: 100%;
  }

  .stat-grid .stat-card:nth-child(1),
  .stat-grid .stat-card:nth-child(2),
  .stat-grid .stat-card:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
    align-self: auto;
  }

  .stat-card { min-height: auto; padding: 18px 16px; gap: 16px; }
  .stat-number { font-size: 32px; width: 48px; }

  /* Portfolio / Deck */
  .deck { width: 220px; height: 145px; }
  .deck-container { gap: 12px; }
  .deck-arrow { width: 36px; height: 36px; font-size: 16px; }
  .deck-card__title { font-size: 18px; }
  .deck-card__label { padding: 14px 16px; }

  /* Overlay — stack vertically, scrollable */
  .exp-overlay {
    align-items: flex-start;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .exp-overlay__inner {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow-y: visible;
    padding: 72px 20px 48px;
    gap: 24px;
    align-items: flex-start;
  }

  .exp-media { flex: 0 0 auto; width: 100%; }

  .exp-info { flex: 0 0 auto; width: 100%; }
  .exp-info__title { font-size: 26px; }

  /* Close button stays top-right */
  .exp-overlay__close { top: 16px; right: 16px; font-size: 22px; }

  /* Project nav arrows move to top-left, no longer overlapping content */
  .exp-overlay__project-arrow {
    width: 36px; height: 36px; font-size: 18px;
    top: 12px;
    bottom: auto;
    transform: none;
  }
  .exp-overlay__project-arrow--left  { left: 16px; }
  .exp-overlay__project-arrow--right { left: 60px; right: auto; }

  .media-arrow { width: 32px; height: 32px; font-size: 14px; }
  .media-arrow--left  { left: -10px; }
  .media-arrow--right { right: -10px; }

  /* Skills — single column */
  .skills-two-col { grid-template-columns: 1fr; }
  .skill-name { font-size: 18px; }
  .skills-logo { padding-top: 0; }
  .skills-logo img { max-width: 200px; }

  /* Contact */
  .contact-value { font-size: 16px; }
  .cv-button { width: 100%; text-align: center; }

  /* Studies */
  .study-degree { font-size: 22px; }
}
