/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
  --court-navy-dark: #0a1226;
  --court-navy-light: #1b2e5c;
  --court-navy-mid: #0c204d;

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-muted: #86868b;

  --tennis-ball: #ccff00;
  --tennis-ball-dark: #9aad00;

  --surface-line: rgba(255, 255, 255, 0.14);
  --accent-link: #2997ff;

  /* Experience cards (on white) */
  --card-bg: rgba(255, 255, 255, 0.96);
  --card-text: #1d1d1f;
  --card-text-secondary: #515154;
  --card-text-muted: #6e6e73;
  --card-date: #1b2e5c;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-button: 980px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--court-navy-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  --header-height: 56px;
  scroll-padding-top: var(--header-height);
}

/* App splash — profile image preloaded before reveal */
html.is-app-loading,
html.is-app-loading body {
  overflow: hidden;
}

html.is-app-loading body > *:not(#app-splash) {
  visibility: hidden;
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--court-navy-dark);
}

html.is-app-loading .app-splash {
  display: flex;
}

.app-splash__spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--tennis-ball);
  border-radius: 50%;
  animation: app-splash-spin 0.75s linear infinite;
}

@keyframes app-splash-spin {
  to {
    transform: rotate(360deg);
  }
}

html.is-app-ready .app-splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

html.is-app-ready body > *:not(#app-splash) {
  visibility: visible;
}

/* ==========================================================================
   Glass Site Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  padding: 0 24px 0 16px;
  border-bottom: none;
  background: linear-gradient(
    180deg,
    rgba(10, 18, 38, 0.82) 0%,
    rgba(10, 18, 38, 0.42) 55%,
    rgba(10, 18, 38, 0) 100%
  );
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 28px;
  background: linear-gradient(180deg, rgba(10, 18, 38, 0.12), transparent);
  pointer-events: none;
}

.site-header__inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-header__brand {
  flex-shrink: 0;
  margin-right: auto;
  padding-left: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.site-header__brand:hover {
  color: #ffffff;
  opacity: 0.9;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header__link {
  padding: 6px 0;
  margin-left: 28px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-header__link:hover {
  color: rgba(255, 255, 255, 1);
}

.site-header__link.is-active {
  color: rgba(255, 255, 255, 1);
  font-weight: 500;
}

.site-header__menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.site-header__menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header__menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header__menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.site-header__menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  body {
    --header-height: 52px;
  }

  .site-header {
    padding: 0 16px 0 12px;
  }

  .site-header__brand {
    font-size: 14px;
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header__menu-btn {
    display: flex;
    flex-shrink: 0;
  }

  .site-header__nav {
    position: absolute;
    top: var(--header-height);
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: rgba(10, 18, 38, 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(5, 14, 36, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
  }

  .site-header__nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-header__link {
    text-align: center;
    padding: 12px 16px;
  }
}

/* Custom Scrollbar for modern touch */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--court-navy-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Fixed Tennis Court Background
   ========================================================================== */
.court-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.court-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 30%, rgba(10, 18, 38, 0.4) 100%);
  pointer-events: none;
  z-index: -1;
}

.court-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.court-lines {
  opacity: 0.32;
}



/* ==========================================================================
   Content Layout
   ========================================================================== */
.content-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: block;
  padding: 0 20px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
   Profile Section Layout
   ========================================================================== */
.profile-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 72px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  padding: calc(var(--header-height) + 40px) 0 80px;
  scroll-margin-top: var(--header-height);
}

#about,
#experience,
#skills,
#projects,
#contact {
  scroll-margin-top: var(--header-height);
}

.section-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.42);
  margin: 0 0 10px;
}

/* Profile Picture Styles (Frame-free, larger) */
.profile-image-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-image-container {
  position: relative;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Profile Content Styles */
.profile-content-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  color: #ffffff;
}

.profile-name {
  font-size: 48px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.08;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.profile-profession {
  font-size: 21px;
  font-weight: 400;
  color: #e8e8ed;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

/* Actions Inline Row */
.profile-actions {
  display: flex;
  align-items: center;
  gap: 32px;
}

.btn-resume {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  background-color: rgba(204, 255, 0, 1);
  color: #1d1d1f;
  border: none;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}

.btn-resume:hover {
  background-color: #ffffff;
  opacity: 0.95;
}

/* Minimalist Social Icons */
.social-icons {
  display: flex;
  gap: 20px;
  align-items: center;
}

.social-icon {
  color: #ffffff;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-icon:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* ==========================================================================
   Responsive Adjustments & Portrait Styling
   ========================================================================== */
@media (max-width: 900px) {
  .profile-section {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding: 40px 0;
  }

  .profile-content-col {
    align-items: center;
    text-align: center;
  }

  .profile-image-container {
    width: 280px;
    height: 280px;
  }

  .profile-actions {
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }

  .btn-resume {
    width: 100%;
    max-width: 260px;
  }

  .social-icons {
    justify-content: center;
  }
  
  /* Responsive About Section for Mobile */
  .about-section {
    padding: 72px 10px;
    min-height: auto;
  }

  /* Responsive Experience Section for Mobile */
  .experience-section {
    padding: 80px 10px;
    min-height: auto;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .experience-headline {
    font-size: 30px;
  }

  .exp-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .profile-name {
    font-size: 38px;
  }

  .profile-profession {
    font-size: 20px;
  }

  .experience-headline {
    font-size: 26px;
  }
}

/* ==========================================================================
   About Section — macOS-style window
   ========================================================================== */
.about-section {
  width: 100%;
  max-width: 1100px;
  padding: 96px 0 112px;
}

.about-wrap {
  width: 100%;
}

.about-heading {
  font-size: clamp(28px, 4.8vw, 44px);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 32px;
  max-width: 22ch;
}

.about-window {
  width: 100%;
  height: 560px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.about-window__header {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.about-window__traffic {
  display: flex;
  gap: 8px;
  position: absolute;
  left: 1.25rem;
}

.about-window__light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.about-window__light--red {
  background: #ff5f56;
}

.about-window__light--yellow {
  background: #ffbd2e;
}

.about-window__light--green {
  background: #27c93f;
}

.about-window__titlebar {
  width: 100%;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
}

.about-window__body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.about-window__sidebar {
  width: 200px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0.65rem;
}

.about-window__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-window__nav-btn {
  background: none;
  border: none;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  width: 100%;
}

.about-window__nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.about-window__nav-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.about-window__nav-btn svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.about-window__content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.about-pane {
  position: absolute;
  inset: 0;
  padding: 2.5rem 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.4s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow-y: auto;
}

.about-pane.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.about-pane__inner {
  max-width: 620px;
  width: 100%;
}

.about-pane__lead {
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 1.5rem;
}

.about-pane__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  color: var(--tennis-ball);
  opacity: 0.75;
  margin: 0 0 1.25rem;
  animation: aboutCodeFlicker 3s ease-in-out infinite;
}

@keyframes aboutCodeFlicker {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

.about-pane__link {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-link);
  text-decoration: none;
}

.about-pane__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  user-select: none;
}

.about-pill:hover {
  background: rgba(255, 255, 255, 0.1);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #30d158;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-text {
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

/* Focus tab */
.about-pane__inner--focus {
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.about-focus__orb {
  position: relative;
  width: 220px;
  height: 220px;
  margin-bottom: 1rem;
}

.about-focus__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tennis-ball) 0%, rgba(204, 255, 0, 0.2) 70%);
  box-shadow: 0 0 40px rgba(204, 255, 0, 0.35);
  animation: aboutCorePulse 3s ease-in-out infinite;
}

@keyframes aboutCorePulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.about-focus__node {
  position: absolute;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.about-focus__node:nth-child(1) { top: 8%; left: 50%; transform: translateX(-50%); }
.about-focus__node:nth-child(2) { top: 42%; right: 0; }
.about-focus__node:nth-child(3) { bottom: 12%; left: 8%; }
.about-focus__node:nth-child(4) { top: 38%; left: 0; }

.about-focus__metrics {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-metric {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 130px;
  text-align: left;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.about-metric:hover {
  transform: translateX(-4px);
  border-color: rgba(204, 255, 0, 0.4);
}

.about-metric__value {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--tennis-ball);
  letter-spacing: -0.02em;
}

.about-metric__label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.about-focus__label {
  margin-top: 1rem;
}

.about-focus__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.about-focus__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Path tab */
.about-schematic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 520px;
}

.about-schematic__node {
  width: 100%;
  padding: 1.35rem 1.5rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.about-schematic__node:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}

.about-schematic__node--highlight {
  border-color: rgba(204, 255, 0, 0.45);
  box-shadow: 0 0 28px rgba(204, 255, 0, 0.08);
}

.about-schematic__id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: var(--tennis-ball);
  opacity: 0.85;
  letter-spacing: 0.04em;
}

.about-schematic__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 8px 0 6px;
}

.about-schematic__detail {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

.about-schematic__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-schematic__tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
}

.about-schematic__connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 28px;
}

.about-schematic__line {
  width: 2px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
}

.about-schematic__arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid rgba(204, 255, 0, 0.6);
}

@media (max-width: 850px) {
  .about-window {
    height: auto;
    min-height: 480px;
  }

  .about-window__body {
    flex-direction: column;
  }

  .about-window__sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.85rem 0.75rem;
  }

  .about-window__nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .about-window__nav-btn {
    white-space: nowrap;
    width: auto;
    padding: 0.6rem 1rem;
  }

  .about-window__content {
    min-height: 380px;
  }

  .about-pane {
    position: relative;
    inset: auto;
    padding: 1.75rem 1.25rem;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .about-pane.is-active {
    display: flex;
  }

  .about-focus__metrics {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 8px;
  }

  .about-metric {
    min-width: 100px;
    flex: 1 1 100px;
  }

  .about-pane__inner--focus {
    min-height: auto;
  }
}

/* ==========================================================================
   Scroll Reveal Animation
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Experience Section — Clean Vertical Timeline
   ========================================================================== */
.experience-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 960px;
  padding: 100px 0 140px;
}

.experience-header {
  text-align: center;
  margin-bottom: 80px;
}

.experience-headline {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-top: 12px;
}

/* ── Timeline container ──────────────────────────── */
.timeline {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Vertical spine — grows downward on scroll via JS height change */
.timeline-spine {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 1.5px;
  height: 0; /* animated to 100% by JS */
  background: rgba(255, 255, 255, 0.2);
  transition: height 1.6s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 99px;
}

.timeline-spine.grow {
  height: 100%;
}

/* ── Timeline Item Row ───────────────────────────── */
.tl-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  gap: 0;
}

/* Left items: card → dot */
.tl-item--left {
  flex-direction: row;
  justify-content: flex-start;
}

/* Right items: dot → card */
.tl-item--right {
  flex-direction: row;
  justify-content: flex-end;
}

/* The dot in the center spine */
.tl-dot {
  width: 13px;
  height: 13px;
  background: #ffffff;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tl-item:hover .tl-dot {
  transform: scale(1.15);
  background: #ffffff;
}

/* Left-side card pushes dot toward center */
.tl-item--left .tl-card {
  width: calc(50% - 36px);
  margin-right: 30px;
  text-align: right;
}

/* Right-side card receives dot from center */
.tl-item--right .tl-card {
  width: calc(50% - 36px);
  margin-left: 30px;
  text-align: left;
}

/* ── Floating text (no boxes) ───────────────────── */
.tl-card {
  padding: 12px 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: opacity 0.2s ease;
}

.tl-item:hover .tl-card {
  transform: none;
  box-shadow: none;
}

.tl-date {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(204, 255, 0, 1);
  margin-bottom: 10px;
}

.tl-role {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.tl-company {
  font-size: 13px;
  font-weight: 500;
  color: #e8e8ed;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.tl-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
  letter-spacing: -0.01em;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .experience-section {
    padding: 80px 16px 100px;
  }

  .experience-headline {
    font-size: 30px;
  }

  /* Collapse to single column — all cards on the right, spine on left */
  .timeline-spine {
    left: 12px;
    transform: none;
  }

  .tl-item--left,
  .tl-item--right {
    flex-direction: row;
    justify-content: flex-start;
  }

  .tl-item--left .tl-card,
  .tl-item--right .tl-card {
    width: calc(100% - 50px);
    margin-left: 24px;
    margin-right: 0;
    text-align: left;
  }

  /* Move dot to the left edge on mobile */
  .tl-item--left .tl-dot {
    order: -1;
  }
}

@media (max-width: 480px) {
  .experience-headline {
    font-size: 26px;
  }

  .tl-card {
    padding: 10px 0;
  }

  .tl-role {
    font-size: 16px;
  }
}

/* ==========================================================================
   Skills Section — Apple-style category boxes
   ========================================================================== */
.skills-section {
  width: 100%;
  max-width: 1100px;
  padding: 0 0 96px;
}

.skills-inner {
  width: 100%;
}

.skills-header {
  text-align: left;
  margin-bottom: 36px;
}

.skills-headline {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 12px 0 0;
  max-width: 20ch;
}

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

.skills-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 22px 22px 20px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.skills-card:hover {
  border-color: rgba(204, 255, 0, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.skills-card__head {
  margin-bottom: 16px;
}

.skills-card__tag {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.skills-card__desc {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(204, 255, 0, 1);
}

.skills-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.skill-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: var(--card-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.skill-chip span {
  min-width: 0;
  line-height: 1.25;
  text-align: center;
}

.skill-chip:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: rgba(204, 255, 0, 0.45);
}

.skill-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.skill-chip--text span {
  flex: 0 1 auto;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .skills-card {
    padding: 20px 18px 18px;
  }

  .skills-card__tag {
    font-size: 15px;
  }

  .skills-card__desc {
    font-size: 13px;
  }

  .skills-headline {
    max-width: none;
  }

  .skills-chips {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  }

  .skill-chip {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .skill-chip img {
    width: 20px;
    height: 20px;
  }
}

/* ==========================================================================
   Work / Projects — story-driven showcase
   ========================================================================== */
.projects-section {
  width: 100%;
  max-width: 1100px;
  padding: 0 0 96px;
}

.projects-header {
  text-align: left;
  margin-bottom: 32px;
}

.projects-headline {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 22ch;
}

.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.projects-filter {
  padding: 8px 16px;
  border-radius: var(--radius-button);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.projects-filter:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
}

.projects-filter.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.projects-stories {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-story {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 28px 28px 24px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.project-story.is-hidden {
  display: none;
}

.project-story:hover {
  border-color: rgba(204, 255, 0, 0.22);
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.project-story__head {
  position: relative;
  padding-left: 52px;
  margin-bottom: 22px;
}

.project-story__chapter {
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: rgba(204, 255, 0, 0.55);
}

.project-story__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.project-story__tags span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-story__title {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 10px;
}

.project-story__hook {
  font-size: 16px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  max-width: 52ch;
  font-weight: 400;
}

.project-story__hook em {
  font-style: italic;
  color: rgba(204, 255, 0, 0.9);
}

.project-story__beats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.project-story__beat {
  padding-right: 8px;
}

.project-story__beat:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.project-story__beat-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(204, 255, 0, 0.65);
  margin-bottom: 8px;
}

.project-story__beat p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.52);
  margin: 0;
}

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

.project-story__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-story__stack span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-story__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--tennis-ball);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-story__link:hover {
  opacity: 0.88;
  transform: translateX(3px);
}

.project-story.reveal {
  transition-delay: calc(var(--story-index, 0) * 70ms);
}

@media (max-width: 900px) {
  .project-story__beats {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-story__beat:not(:last-child) {
    border-right: none;
    padding-right: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .project-story__beat:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .project-story {
    padding: 22px 18px 20px;
  }

  .project-story__head {
    padding-left: 44px;
  }

  .projects-filters {
    gap: 6px;
    margin-bottom: 24px;
  }

  .projects-filter {
    padding: 7px 12px;
    font-size: 12px;
  }

  .project-story__foot {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ==========================================================================
   Contact
   ========================================================================== */
.contact-section {
  width: 100%;
  max-width: 1100px;
  padding: 0 0 100px;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.contact-inner .section-label {
  margin-bottom: 20px;
}

.contact-card {
  width: 100%;
  max-width: 520px;
  padding: 28px 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover {
  border-color: rgba(204, 255, 0, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.contact-card__label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(204, 255, 0, 0.7);
  margin-bottom: 12px;
}

.contact-email {
  display: block;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 24px;
  word-break: break-all;
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--tennis-ball);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-button);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.contact-btn--primary {
  background: var(--tennis-ball);
  color: #1d1d1f;
  border: none;
}

.contact-btn--primary:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.contact-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.contact-btn--ghost.is-copied {
  border-color: rgba(204, 255, 0, 0.45);
  color: var(--tennis-ball);
}

.contact-hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: rgba(204, 255, 0, 0.85);
}

.contact-hint[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .contact-card {
    padding: 22px 20px;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-btn {
    width: 100%;
  }
}

/* ==========================================================================
   Site Footer — mirrors header glass bar
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 100;
  margin-top: auto;
  padding: 0 24px 20px 16px;
  border-top: none;
  background: linear-gradient(
    0deg,
    rgba(10, 18, 38, 0.88) 0%,
    rgba(10, 18, 38, 0.45) 50%,
    rgba(10, 18, 38, 0) 100%
  );
}

.site-footer__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 32px;
  background: linear-gradient(0deg, rgba(10, 18, 38, 0.14), transparent);
  pointer-events: none;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-height);
  flex-wrap: wrap;
}

.site-footer__brand {
  flex-shrink: 0;
  margin-right: auto;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__brand:hover {
  opacity: 0.9;
}

.site-footer__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
}

.site-footer__link {
  padding: 6px 0;
  margin-left: 28px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__link:hover {
  color: rgba(255, 255, 255, 1);
}

.site-footer__top {
  margin-left: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tennis-ball);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-footer__top:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.site-footer__copy {
  margin: 8px 0 0;
  padding-left: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 0 16px 16px 12px;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: auto;
    padding: 16px 0 8px;
  }

  .site-footer__brand {
    margin-right: 0;
  }

  .site-footer__nav {
    width: 100%;
    justify-content: flex-start;
  }

  .site-footer__link {
    margin-left: 0;
    margin-right: 20px;
  }

  .site-footer__top {
    margin-left: 0;
  }
}