/* ==========================================================================
   IVÁN FERNÁNDEZ GARCÍA — PORTFOLIO DESIGN SYSTEM
   Aesthetic: Precision Meets Elegance — Dark Navy & Warm Ivory
   Typography: Cormorant Garamond (Serif) + Inter (Sans) + JetBrains Mono (Code)
   Clean & Optimized: Contains exclusively active rules used in index.html
   ========================================================================== */
 
/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Fonts */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'Fira Code', monospace;
 
  /* Spacing Scale */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 40px;
  --space-3xl: 56px;
  --space-4xl: 72px;
 
  /* Layout */
  --max-width: 1200px;
  --nav-height: 70px;
 
  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
 
  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.18s ease;
  --transition-base: 0.26s ease;
  --transition-smooth: 0.4s var(--ease-out-expo);
}
 
/* Light Theme (Default): ivory + very dark navy + petrol-turquoise */
:root,
html[data-theme="light"] {
  --bg-primary: #F5F0E8;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #ECE6DA;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-hover: rgba(255, 255, 255, 0.92);
  --bg-nav: rgba(245, 240, 232, 0.88);

  --text-primary: #081428;
  --text-secondary: #2C3A52;
  --text-tertiary: #5B6779;
  --text-inverse: #F5F0E8;
  --on-accent: #FFFFFF;

  /* Support colour: a petrol turquoise (blue-leaning), readable on ivory and
     in harmony with the navy text. Bright turquoise is kept for decoration. */
  --accent: #0B7285;
  --accent-hover: #095C6B;
  --accent-subtle: rgba(11, 114, 133, 0.09);

  /* Bright turquoise: gradients, dots, highlights (never small text) */
  --accent-2: #14B8A6;
  --accent-2-hover: #0D9488;
  --accent-2-subtle: rgba(20, 184, 166, 0.12);

  --stroke-hover: rgba(11, 114, 133, 0.42);
  --glow-nav: rgba(11, 114, 133, 0.22);
  --glow-btn: rgba(11, 114, 133, 0.28);

  --glass-border: rgba(8, 20, 40, 0.10);
  --glass-border-hover: rgba(11, 114, 133, 0.38);
  --glass-blur: blur(14px);

  --shadow-sm: 0 2px 8px rgba(8, 20, 40, 0.05);
  --shadow-card: 0 6px 24px rgba(8, 20, 40, 0.07);
  --shadow-card-hover: 0 12px 32px rgba(8, 20, 40, 0.12);

  --timeline-line: #D3CDBF;
  --timeline-dot: #0B7285;

  --tag-bg: rgba(11, 114, 133, 0.08);
  --tag-text: #0B7285;
  --tag-border: rgba(11, 114, 133, 0.22);

  --divider: rgba(8, 20, 40, 0.09);
  --success: #059669;

  /* Moving background colour fields: aqua, warm sand and soft sage over the ivory */
  --blob-1: rgba(157, 237, 243, 0.36);
  --blob-2: rgba(236, 204, 156, 0.50);
  --blob-3: rgba(186, 222, 196, 0.45);
}

/* Dark Theme: very dark navy + cool white text + turquoise */
html[data-theme="dark"] {
  --bg-primary: #081428;
  --bg-secondary: #0F2038;
  --bg-tertiary: #060F20;
  --bg-card: rgba(15, 32, 56, 0.58);
  --bg-card-hover: rgba(20, 42, 72, 0.80);
  --bg-nav: rgba(8, 20, 40, 0.85);

  --text-primary: #F8FAFC;
  --text-secondary: #C3CFDC;
  --text-tertiary: #8796AB;
  --text-inverse: #081428;
  --on-accent: #081428;

  --accent: #2DD4BF;
  --accent-hover: #5EEAD4;
  --accent-subtle: rgba(45, 212, 191, 0.12);

  --accent-2: #0E9AB0;
  --accent-2-hover: #1FB5CC;
  --accent-2-subtle: rgba(14, 154, 176, 0.16);

  --stroke-hover: rgba(45, 212, 191, 0.48);
  --glow-nav: rgba(45, 212, 191, 0.35);
  --glow-btn: rgba(45, 212, 191, 0.35);

  --glass-border: rgba(248, 250, 252, 0.10);
  --glass-border-hover: rgba(45, 212, 191, 0.42);
  --glass-blur: blur(16px);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.34);
  --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.52);

  --timeline-line: #1B2B45;
  --timeline-dot: #2DD4BF;

  --tag-bg: rgba(45, 212, 191, 0.10);
  --tag-text: #5EEAD4;
  --tag-border: rgba(45, 212, 191, 0.24);

  --divider: rgba(248, 250, 252, 0.09);
  --success: #34D399;

  /* Moving background colour fields: deep teal, deep blue, deep cyan
     (darker than the cards, so sections stand out when they pass behind) */
  --blob-1: rgba(10, 118, 109, 0.34);
  --blob-2: rgba(25, 73, 144, 0.5);
  --blob-3: rgba(14, 116, 144, 0.36);
}
 
/* --------------------------------------------------------------------------
   2. Reset & Global Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
 
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
 
body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}
 
/* Accessible Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s ease;
}
 
.skip-link:focus {
  top: 15px;
  outline: 3px solid var(--accent-2);
}
 
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
 
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
 
/* Typography Hierarchy */
h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.25;
}
 
h1,
.hero-name {
  font-family: var(--font-display);
}
 
h2,
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 2.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
 
p {
  margin-bottom: var(--space-md);
}
 
p:last-child {
  margin-bottom: 0;
}
 
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
 
a:hover {
  color: var(--accent-hover);
}
 
img,
svg {
  display: block;
  max-width: 100%;
}
 
button {
  font-family: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
}
 
/* Layout Utilities (Reduced Spacing) */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}
 
.section {
  padding-top: var(--space-3xl);
  /* 56px */
  padding-bottom: var(--space-3xl);
  /* 56px */
  position: relative;
}
 
@media (max-width: 768px) {
  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }
}
 
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px auto;
}
 
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-tertiary);
  font-style: italic;
  font-weight: 300;
}
 
/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth),
    box-shadow var(--transition-smooth),
    border-color var(--transition-base),
    background var(--transition-base);
}
 
.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--glass-border-hover);
}
 
/* --------------------------------------------------------------------------
   3. Scroll Progress Indicator
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 9999;
  transition: width 0.05s linear;
}
 
/* --------------------------------------------------------------------------
   4. Header & Navigation Component
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition-base), backdrop-filter var(--transition-base), border-color var(--transition-base);
  border-bottom: 1px solid transparent;
}
 
.site-header.scrolled {
  background: var(--bg-nav);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
 
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
 
.brand-link {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
 
/* Navigation Menu Container with Active Pill */
.nav-container {
  position: relative;
  display: none;
}
 
@media (min-width: 900px) {
  .nav-container {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 5px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
  }
}
 
.nav-container {
  transition: width 0.45s var(--ease-out-expo);
}

.nav-container.is-resizing {
  overflow: hidden;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
  flex-shrink: 0;
}
 
.nav-link {
  position: relative;
  display: block;
  padding: 7px 15px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-pill);
  transition: color var(--transition-fast);
  white-space: nowrap;
  z-index: 2;
}
 
.nav-link:hover {
  color: var(--text-primary);
}
 
.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}
 
/* Glowing Active Horizontal Pill */
.nav-pill-indicator {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  width: 0;
  background: var(--accent-subtle);
  border: 1px solid var(--tag-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 16px var(--glow-nav);
  pointer-events: none;
  transition: transform 0.4s var(--ease-out-expo), width 0.4s var(--ease-out-expo), opacity 0.25s ease;
  z-index: 1;
  opacity: 0;
}
 
/* Nav Actions (Theme Toggle & Mobile Menu) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
 

/* Segmented Language Switch (Desktop & Mobile) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.lang-switch-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
  user-select: none;
}

.lang-switch-btn:hover {
  color: var(--text-primary);
}

.lang-switch-btn.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--tag-border);
  font-weight: 600;
  box-shadow: 0 0 14px var(--glow-nav);
}

/* Header switch: same height as the theme toggle and the hamburger (40px) */
.nav-actions .lang-switch {
  height: 40px;
  align-items: stretch;
}

.nav-actions .lang-switch .lang-switch-btn {
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.mobile-lang-container {
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.mobile-lang-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.mobile-lang-switch {
  width: 100%;
  display: flex;
}

.mobile-lang-switch .lang-switch-btn {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  font-size: 0.85rem;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), color var(--transition-fast), background var(--transition-fast);
}
 
.theme-toggle-btn:hover {
  color: var(--accent);
  transform: rotate(18deg) scale(1.05);
}
 
.theme-icon-sun,
.theme-icon-moon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
 
html[data-theme="light"] .theme-icon-moon {
  display: none;
}
 
html[data-theme="light"] .theme-icon-sun {
  display: block;
}
 
html[data-theme="dark"] .theme-icon-sun {
  display: none;
}
 
html[data-theme="dark"] .theme-icon-moon {
  display: block;
}
 
/* Mobile Hamburger */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}
 
@media (min-width: 900px) {
  .mobile-menu-btn {
    display: none;
  }
}
 
.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
 
.mobile-menu-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
 
.mobile-menu-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
}
 
.mobile-menu-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
 
/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  height: calc(100dvh - var(--nav-height));
  overflow-y: auto;
  background: var(--bg-primary);
  backdrop-filter: var(--glass-blur);
  padding: var(--space-xl) var(--space-lg);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.3s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
 
.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
 
.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
 
.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
}
 
.mobile-nav-link.active {
  color: var(--accent);
}
 
/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--nav-height) + 24px);
  padding-bottom: 88px;
  /* room for the scroll-down cue */
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
 
.hero-section>.container,
.scroll-indicator {
  z-index: 1;
}
 
.hero-section>.container {
  position: relative;
}
 
/* No photo: the hero is a single centred column */
.hero-grid {
  display: flex;
  justify-content: center;
}
 
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 820px;
}
 
.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
 
.hero-name {
  font-size: clamp(2.5rem, 7.2vw, 4.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}
 
.hero-typewriter-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-md);
  min-height: 38px;
}
 
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--accent);
  animation: blink 1s infinite;
}
 
@keyframes blink {
 
  0%,
  100% {
    opacity: 1;
  }
 
  50% {
    opacity: 0;
  }
}
 
.hero-tagline {
  font-size: 1.075rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-xl);
  line-height: 1.65;
}
 
/* Hero CTAs */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}
 
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent; /* same box for every button, so heights match */
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent-hover); /* fine rim, same idea as the active pill */
  box-shadow: 0 4px 16px var(--glow-btn);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--glow-btn);
}

/* Secondary controls share the look of the top bar: 1px hairline, soft shadow,
   and on hover the same tinted fill + glow as the active section pill. */
.btn-outline {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-secondary));
  border-color: var(--stroke-hover);
  box-shadow: 0 0 16px var(--glow-nav);
  transform: translateY(-2px);
}
 
/* Social Quick Links */
@media (min-width: 640px) {
  .hero-cta-group .social-links {
    margin-left: var(--space-xs);
  }
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}
 
.social-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  transition: transform var(--transition-fast), color var(--transition-fast),
    background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.social-icon-btn:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-secondary));
  border-color: var(--stroke-hover);
  box-shadow: 0 0 14px var(--glow-nav);
  transform: translateY(-2px);
}
 
/* Scroll Down Bouncing Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
  font-size: 0.725rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: bounce 2s infinite ease-in-out;
  transition: opacity 0.3s ease;
}
 
/* Scroll-revealed content remains visible without JavaScript. */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out-expo) var(--reveal-delay, 0ms),
    transform 0.6s var(--ease-out-expo) var(--reveal-delay, 0ms);
}
 
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
 
@keyframes bounce {
 
  0%,
  100% {
    transform: translate(-50%, 0);
  }
 
  50% {
    transform: translate(-50%, 6px);
  }
}
 
/* --------------------------------------------------------------------------
   6. About Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: block;
  max-width: 980px;
  margin: 0 auto;
}
 
.about-content {
  display: flex;
  flex-direction: column;
}
 
.about-text-lead {
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: var(--space-md);
}
 
/* Value Cards Row */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
 
@media (min-width: 640px) {
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
 
.value-card {
  padding: var(--space-md);
  border-radius: var(--radius-md);
}
 
.value-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}
 
.value-title {
  font-size: 0.975rem;
  font-weight: 600;
  margin-bottom: 4px;
}
 
.value-desc {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}
 
/* --------------------------------------------------------------------------
   7. Experience Section (Vertical Interactive Timeline)
   -------------------------------------------------------------------------- */
.timeline-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
 
/* Vertical Spine Line */
.timeline-spine {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 20px;
  width: 2px;
  background: var(--timeline-line);
}
 
@media (min-width: 768px) {
  .timeline-spine {
    left: 50%;
    transform: translateX(-50%);
  }
}
 
.timeline-spine-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: height 0.1s linear;
}
 
.timeline-item {
  position: relative;
  margin-bottom: var(--space-2xl);
  display: flex;
}
 
.timeline-item:last-child {
  margin-bottom: 0;
}
 
/* Timeline Node Dot */
.timeline-dot {
  position: absolute;
  left: 12px;
  top: 22px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--timeline-dot);
  box-shadow: 0 0 0 4px var(--bg-primary), 0 0 12px var(--glow-nav);
  z-index: 3;
  transition: transform 0.3s ease, background 0.3s ease;
}
 
@media (min-width: 768px) {
  .timeline-dot {
    left: 50%;
    transform: translateX(-50%);
  }
}
 
.timeline-dot.active {
  background: var(--timeline-dot);
  transform: scale(1.15);
}

@media (min-width: 768px) {
  .timeline-dot.active {
    transform: translateX(-50%) scale(1.15);
  }
}
 
/* Timeline Card Content */
.timeline-card {
  margin-left: 50px;
  width: calc(100% - 50px);
  padding: var(--space-lg);
}
 
@media (min-width: 768px) {
  .timeline-item.left .timeline-card {
    margin-left: 0;
    margin-right: calc(50% + 28px);
    width: calc(50% - 28px);
  }
 
  .timeline-item.right .timeline-card {
    margin-left: calc(50% + 28px);
    margin-right: 0;
    width: calc(50% - 28px);
  }
}
 
.timeline-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}
 
.timeline-role-icon,
.timeline-degree-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-subtle);
  border: 1px solid var(--tag-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
 
.timeline-role-title {
  font-size: 1.175rem;
  font-weight: 600;
  margin-bottom: 2px;
}
 
.timeline-company-name {
  font-size: 0.925rem;
  color: var(--accent);
  font-weight: 500;
}
 
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 3px;
}
 
.timeline-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
 
.timeline-bullets {
  list-style: none;
  margin-bottom: var(--space-md);
  margin-top: var(--space-xs);
}
 
.timeline-bullets li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
 
.timeline-bullets li::before {
  content: '•';
  position: absolute;
  left: 5px;
  color: var(--accent);
  font-size: 1.1rem;
}
 
/* Tag Chips */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
 
.tag-chip {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  transition: transform var(--transition-fast), background var(--transition-fast);
}
 
.tag-chip:hover {
  transform: translateY(-1px);
  background: var(--accent-subtle);
}
 
/* --------------------------------------------------------------------------
   8. Projects Section (2-Project Showcase)
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}
 
.project-card {
  position: relative;
  /* anchor for the stretched link */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  gap: var(--space-md);
}
 
/* Header row: image on the left, category + title on the right */
.project-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
  align-items: center;
}
 
.project-thumbnail {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
}
 
.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out-expo);
}
 
.project-card:hover .project-thumbnail img {
  transform: scale(1.04);
}
 
.project-head-text {
  min-width: 0;
}
 
.project-category {
  display: block;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
 
.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}
 
/* The whole card is clickable: the link stretches over it */
.project-link {
  color: var(--text-primary);
}
 
.project-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
 
.project-card:hover .project-link {
  color: var(--accent);
}
 
.project-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
 
.project-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
 
.project-desc p {
  margin-bottom: var(--space-sm);
}
 
/* Read more / Read less (native <details>, no JS needed) */
.project-more summary {
  position: relative;
  z-index: 2;
  /* sits above the stretched link so it stays clickable */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
  padding: 2px 0;
}
 
.project-more summary::-webkit-details-marker {
  display: none;
}
 
.project-more summary:hover {
  color: var(--accent-hover);
}
 
.project-more summary svg {
  transition: transform var(--transition-base);
}
 
.project-more[open] summary svg {
  transform: rotate(180deg);
}
 
.project-more .less-label {
  display: none;
}
 
.project-more[open] .more-label {
  display: none;
}
 
.project-more[open] .less-label {
  display: inline;
}
 
.project-more-content {
  margin-top: var(--space-sm);
}
 
.project-more-content p:last-child {
  margin-bottom: var(--space-sm);
}
 
@media (max-width: 600px) {
  .project-card {
    padding: var(--space-md);
  }
 
  .project-head {
    grid-template-columns: 110px 1fr;
    gap: var(--space-md);
  }
 
  .project-title {
    font-size: 1.05rem;
  }
}
 
/* --------------------------------------------------------------------------
   9. Skills Section (Domain Capability Cards)
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
 
@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
 
.skill-domain-card {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}
 
.skill-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
}
 
.skill-domain-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.skill-domain-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-2-subtle);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
 
.skill-domain-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
 
.skill-capability-text {
  font-size: 0.885rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}
 
/* Language Bar Card */
.languages-banner-card {
  grid-column: 1 / -1;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
 
.language-group {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
 
.language-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
 
.lang-badge {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--tag-border);
}
 
/* --------------------------------------------------------------------------
   10. Education Section (Single Column Timeline with Gold Accent)
   -------------------------------------------------------------------------- */
.edu-timeline-spine {
  background: var(--timeline-line);
}
 
.edu-timeline-dot {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px var(--bg-primary), 0 0 12px var(--glow-btn);
}
 
.edu-timeline-dot.active {
  background: var(--accent-2);
}
 
.edu-card {
  max-width: 820px;
}
 
.coursework-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-xs);
}
 
.course-chip {
  font-size: 0.775rem;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
 
.edu-work-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--tag-border);
  text-underline-offset: 3px;
}
 
.edu-work-link:hover {
  text-decoration-color: var(--accent);
}
 
/* --------------------------------------------------------------------------
   11. Contact Section (Direct Contact Hub — Simplified to Email & LinkedIn)
   -------------------------------------------------------------------------- */
.contact-hub-wrapper {
  max-width: 440px;
  margin: 0 auto;
}
 
.contact-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
 
.contact-tile {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}
 
/* Clickable direct redirect link */
.contact-tile-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
 
.contact-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast), background var(--transition-fast);
}
 
.contact-tile:hover .contact-tile-icon {
  transform: scale(1.05);
  background: var(--accent);
  color: var(--on-accent);
}
 
.contact-tile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
 
.contact-tile-label {
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
 
.contact-tile-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  /* never truncated; wraps only if the screen is very narrow */
  transition: color var(--transition-fast);
}
 
.contact-tile-main:hover .contact-tile-value {
  color: var(--accent);
}
 
.contact-tile-arrow {
  color: var(--text-tertiary);
  transition: transform var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
  margin-left: 4px;
}
 
.contact-tile-main:hover .contact-tile-arrow {
  transform: translateX(4px);
  color: var(--accent);
}
 
/* Dedicated Copy Icon Button */
.btn-copy-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
 
.btn-copy-icon:hover {
  color: var(--accent);
  background: var(--accent-subtle);
  border-color: var(--tag-border);
  transform: scale(1.05);
}
 
.btn-copy-icon .copy-success-icon {
  display: none;
}
 
.btn-copy-icon.copied {
  background: rgba(5, 150, 105, 0.12);
  color: var(--success);
  border-color: rgba(5, 150, 105, 0.3);
}
 
.btn-copy-icon.copied .copy-default-icon {
  display: none;
}
 
.btn-copy-icon.copied .copy-success-icon {
  display: block;
}
 
/* --------------------------------------------------------------------------
   12. Footer Component
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-nav);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--divider);
  padding: 24px 0;
}
 
.footer-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}
 
/* Back To Top Floating Button */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 900;
}
 
.back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
 
.back-to-top-btn:hover {
  transform: translateY(-2px);
  color: var(--accent-hover);
  border-color: var(--accent);
}
 
/* --------------------------------------------------------------------------
   13. Accessible Toast Notification System
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 10001;
  pointer-events: none;
}
 
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s ease;
}
 
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
 
.toast-icon-success {
  color: var(--success);
}
 
/* --------------------------------------------------------------------------
   Timeline dates (free side of every timeline step)
   -------------------------------------------------------------------------- */
.timeline-aside {
  display: none; /* mobile: the dates stay inside the card */
}

@media (min-width: 768px) {
  .timeline-item.has-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 56px; /* the dot sits in the middle: 28px + 28px */
    align-items: start;
  }

  .timeline-item.has-aside .timeline-card {
    margin: 0;
    width: auto;
    grid-row: 1;
  }

  /* Dates move to the free side; the card keeps them for screen readers */
  .timeline-item.has-aside .timeline-meta {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .timeline-aside {
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 15px;
  }

  .timeline-item.has-aside.right .timeline-card { grid-column: 2; }
  .timeline-item.has-aside.right .timeline-aside { grid-column: 1; align-items: flex-end; text-align: right; }
  .timeline-item.has-aside.left .timeline-card { grid-column: 1; }
  .timeline-item.has-aside.left .timeline-aside { grid-column: 2; align-items: flex-start; text-align: left; }
}

.timeline-aside p {
  margin: 0;
}

.timeline-aside-date {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.1vw, 1.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.timeline-aside-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Smooth language change (text fades out/in while the top bar resizes)
   -------------------------------------------------------------------------- */
[data-i18n] {
  transition-property: opacity, color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

html.lang-fading [data-i18n] {
  opacity: 0;
}

/* --------------------------------------------------------------------------
   14. Accessibility & Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
 
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
 
  .scroll-indicator {
    animation: none !important;
  }
 
  .reveal-on-scroll {
    transition: none !important;
  }
 
  .typewriter-cursor {
    display: none !important;
  }
}
 


/* --------------------------------------------------------------------------
   Global Ambient Background: blurred colour fields in motion
   Two movements are combined: a slow looping drift (animation) and a
   parallax that follows the page scroll (--bg-scroll, set from script.js).
   -------------------------------------------------------------------------- */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-aurora-blob {
  position: absolute;
  width: 66vmax;
  height: 66vmax;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--blob-color) 0%, transparent 70%);
  will-change: transform;
}

.bg-aurora-blob:nth-child(1) {
  --blob-color: var(--blob-1);
  top: -24vmax;
  left: -18vmax;
  translate: calc(var(--bg-scroll, 0) * 22vw) calc(var(--bg-scroll, 0) * -34vh);
  animation: aurora-a 22s ease-in-out infinite alternate;
}

.bg-aurora-blob:nth-child(2) {
  --blob-color: var(--blob-2);
  top: 4vh;
  right: -26vmax; /* reaches the right edge of the page */
  translate: calc(var(--bg-scroll, 0) * -18vw) calc(var(--bg-scroll, 0) * 40vh);
  animation: aurora-b 28s ease-in-out infinite alternate;
}

.bg-aurora-blob:nth-child(3) {
  --blob-color: var(--blob-3);
  bottom: -30vmax;
  left: 12vw;
  translate: calc(var(--bg-scroll, 0) * 26vw) calc(var(--bg-scroll, 0) * -44vh);
  animation: aurora-c 34s ease-in-out infinite alternate;
}

.bg-aurora-blob:nth-child(4) {
  --blob-color: var(--blob-1);
  width: 48vmax;
  height: 48vmax;
  bottom: -14vmax;
  right: -16vmax;
  translate: calc(var(--bg-scroll, 0) * -24vw) calc(var(--bg-scroll, 0) * -30vh);
  animation: aurora-d 40s ease-in-out infinite alternate;
}

@keyframes aurora-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(34vw, 20vh, 0) scale(1.28); }
  100% { transform: translate3d(12vw, 48vh, 0) scale(0.88); }
}

@keyframes aurora-b {
  0%   { transform: translate3d(0, 0, 0) scale(1.08); }
  50%  { transform: translate3d(-32vw, 32vh, 0) scale(0.84); }
  100% { transform: translate3d(-14vw, -16vh, 0) scale(1.18); }
}

@keyframes aurora-c {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  50%  { transform: translate3d(32vw, -28vh, 0) scale(0.88); }
  100% { transform: translate3d(-14vw, -46vh, 0) scale(1.2); }
}

@keyframes aurora-d {
  0%   { transform: translate3d(0, 0, 0) scale(0.95); }
  100% { transform: translate3d(-34vw, -38vh, 0) scale(1.32); }
}

main {
  position: relative;
  z-index: 1;
}

.hero-name,
.section-title,
.brand-link,
.mobile-nav-link,
.timeline-aside-date {
  font-weight: 400;
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
}


/* --------------------------------------------------------------------------
   Mobile refinements (phones)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  /* Timeline: less dead space on the left, more room for the text */
  .timeline-spine {
    left: 10px;
  }

  .timeline-dot {
    left: 2px;
  }

  .timeline-card {
    margin-left: 34px;
    width: calc(100% - 34px);
    padding: var(--space-md);
  }

  .timeline-card-header {
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .hero-tagline {
    font-size: 1rem;
    line-height: 1.6;
  }

  .project-head {
    grid-template-columns: 88px 1fr;
    gap: var(--space-sm);
  }

  .project-title {
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  /* Header: keep the brand on one line next to the three controls */
  .brand-link {
    font-size: 1.25rem;
    white-space: nowrap;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-actions .lang-switch .lang-switch-btn {
    padding: 0 10px;
  }
}