/* ============================================================
   MIDNIGHT ARCHITECT — Portfolio Design System
   Typography: Sora (display) + DM Sans (body) + JetBrains Mono (code/tags)
   Palette: Deep navy base, electric cyan accent, warm amber highlights
   ============================================================ */

:root {
  /* Core palette */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f35;
  --bg-card-hover: #222845;
  --bg-surface: #0f1629;

  /* Accent colors */
  --accent-cyan: #22d3ee;
  --accent-cyan-dim: rgba(34, 211, 238, 0.15);
  --accent-cyan-glow: rgba(34, 211, 238, 0.3);
  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.15);
  --accent-green: #10b981;
  --accent-green-dim: rgba(16, 185, 129, 0.15);
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-accent: var(--accent-cyan);

  /* Borders */
  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(34, 211, 238, 0.3);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.1);

  /* Layout */
  --container-max: 1200px;
  --section-gap: 7rem;
  --card-radius: 1rem;
  --radius-sm: 0.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.35s var(--ease-out);
  --transition-fast: all 0.2s var(--ease-out);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition-fast);
  margin: 0;
}

a:hover {
  color: #67e8f9;
}

h1, h2, h3, h4 {
  font-family: 'Sora', sans-serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

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

/* CJK font override for Chinese locale */
html[lang="zh"] body {
  font-family: 'DM Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] h3, html[lang="zh"] h4 {
  font-family: 'Sora', 'Noto Sans SC', 'PingFang SC', sans-serif;
}

/* ========== LANGUAGE SWITCHER ========== */
.lang-switcher {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  backdrop-filter: blur(12px);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.lang-btn:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.1);
}

.lang-btn.active {
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

/* ========== CONTAINER ========== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== FLOATING NAV ========== */
.floating-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.floating-nav.visible {
  opacity: 1;
  pointer-events: all;
}

.floating-nav__link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 0.85rem;
  transition: var(--transition-fast);
  backdrop-filter: blur(12px);
  margin: 0;
}

.floating-nav__link:hover,
.floating-nav__link.active {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
}

/* ========== SECTION HEADERS ========== */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header--sub {
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.section-label {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: var(--accent-cyan-dim);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.75rem 0;
  text-align: center;
}

.section-title--sub {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========== HERO SECTION ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem 1.5rem;
  background: var(--bg-primary);
  overflow: hidden;
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero__gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.hero__gradient-orb--1 {
  width: 600px;
  height: 600px;
  background: rgba(34, 211, 238, 0.08);
  top: -20%;
  right: -10%;
  animation: float-orb 20s ease-in-out infinite;
}

.hero__gradient-orb--2 {
  width: 500px;
  height: 500px;
  background: rgba(139, 92, 246, 0.06);
  bottom: -15%;
  left: -10%;
  animation: float-orb 25s ease-in-out infinite reverse;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -40px); }
  66% { transform: translate(-20px, 20px); }
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero__headshot {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.15), 0 0 120px rgba(34, 211, 238, 0.05);
  object-fit: cover;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
}

.hero__headshot:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 80px rgba(34, 211, 238, 0.25);
}

.hero__name {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.03em;
}

.hero__title {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--accent-cyan);
  font-weight: 400;
  font-family: 'DM Sans', sans-serif;
  margin: 0 0 0.5rem 0;
  min-height: 1.5em;
  padding-bottom: 0;
}

.typing-cursor {
  color: var(--accent-cyan);
  animation: cursor-blink 0.8s step-end infinite;
  margin-left: 2px;
  font-weight: 300;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text-secondary);
  margin: 0 0 2.5rem 0;
  line-height: 1.6;
}

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

.hero__metrics {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 0 0 2.5rem 0;
  flex-wrap: wrap;
}

.hero__metric {
  text-align: center;
}

.hero__metric-value {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  display: inline;
  letter-spacing: -0.02em;
}

.hero__metric-plus {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--accent-cyan);
}

.hero__metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.hero__metric-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--border-hover), transparent);
}

.hero__cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  min-height: 48px;
  margin: 0;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: #67e8f9;
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  color: var(--accent-cyan);
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-tertiary);
  margin: 0;
}

.scroll-indicator__mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-tertiary);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator__wheel {
  width: 3px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.scroll-indicator__text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ========== PROJECTS SECTION ========== */
.projects {
  padding: var(--section-gap) 0;
  background: var(--bg-secondary);
  position: relative;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-cyan-dim), transparent);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Featured Project Card */
.project-card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), transparent 50%);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card__image {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card));
}

.project-card__image--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__image--fallback::after {
  content: '';
  font-size: 3rem;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.project-card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  backdrop-filter: blur(12px);
}

.project-card__badge--live {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.project-card__badge--live i {
  font-size: 0.45rem;
  animation: pulse-dot 2s ease-in-out infinite;
}

.project-card__content {
  padding: 1.5rem;
}

.project-card__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.project-card__title {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.project-card__type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.project-card__tagline {
  color: var(--text-secondary);
  margin: 0 0 1.25rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

/* Tech Badges */
.tech-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.tech-badge--nextjs { background: rgba(255,255,255,0.08); color: #e2e8f0; border-color: rgba(255,255,255,0.12); }
.tech-badge--typescript { background: rgba(49,120,198,0.15); color: #60a5fa; border-color: rgba(49,120,198,0.25); }
.tech-badge--tailwind { background: rgba(6,182,212,0.12); color: #22d3ee; border-color: rgba(6,182,212,0.25); }
.tech-badge--dotnet { background: rgba(81,43,212,0.15); color: #a78bfa; border-color: rgba(81,43,212,0.25); }
.tech-badge--postgresql { background: rgba(51,103,145,0.15); color: #7dd3fc; border-color: rgba(51,103,145,0.25); }
.tech-badge--ai { background: rgba(16,185,129,0.12); color: #34d399; border-color: rgba(16,185,129,0.25); }


.project-card__features {
  margin: 0 0 1.25rem 0;
}

.project-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.project-card__features li i {
  color: var(--accent-cyan);
  font-size: 0.7rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.project-card__links {
  display: flex;
  gap: 0.75rem;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 44px;
  margin: 0;
  transition: var(--transition);
}

.project-card__link--primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

.project-card__link--primary:hover {
  background: #67e8f9;
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.25);
}

/* ========== SKILLS SECTION ========== */
.skills-section {
  padding: var(--section-gap) 0;
  background: var(--bg-primary);
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.skill-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  transition: var(--transition);
  text-align: left;
}

.skill-item:hover {
  border-color: var(--border-hover);
}

.skill-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.skill-item__name {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-item__name i {
  color: var(--accent-cyan);
  font-size: 0.85rem;
}

.skill-item__percent {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--accent-cyan);
  font-size: 0.85rem;
}

.skill-bar {
  height: 6px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), #67e8f9);
  border-radius: 3px;
  width: 0;
  transition: width 1.2s var(--ease-out);
  position: relative;
}

.skill-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2));
}

.skill-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--border-hover);
  color: var(--accent-cyan);
}

/* ========== TIMELINE SECTION ========== */
.timeline-section {
  padding: var(--section-gap) 0;
  background: var(--bg-secondary);
  position: relative;
}

.timeline-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-cyan-dim), transparent);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-cyan-dim), transparent);
}

.timeline__item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 1.5rem;
  width: 10px;
  height: 10px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  z-index: 1;
}

.timeline__item:first-child::before {
  background: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}

.timeline__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  text-align: left;
  transition: var(--transition);
}

.timeline__card:hover {
  border-color: var(--border-hover);
}

.timeline__card--current {
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.05);
}

.timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.timeline__title {
  font-family: 'Sora', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.timeline__date {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-cyan);
  font-weight: 500;
  font-size: 0.78rem;
  white-space: nowrap;
  background: var(--accent-cyan-dim);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.timeline__company {
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0.15rem 0;
  font-size: 0.95rem;
}

.timeline__location {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  margin: 0 0 0.75rem 0;
}

.timeline__location i {
  color: var(--accent-cyan);
  margin-right: 0.25rem;
}

/* RAZAC Expandable Areas */
.timeline__areas {
  margin-top: 1rem;
}

.timeline__area {
  border-top: 1px solid var(--border);
}

.timeline__area:last-child {
  border-bottom: none;
}

.timeline__area-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.timeline__area-toggle:hover {
  color: var(--accent-cyan);
}

.timeline__area-toggle i:first-child {
  color: var(--accent-cyan);
  font-size: 0.8rem;
  width: 18px;
  text-align: center;
}

.timeline__area-toggle span {
  flex: 1;
}

.timeline__area-chevron {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  transition: transform 0.3s ease;
}

.timeline__area-toggle[aria-expanded="true"] .timeline__area-chevron {
  transform: rotate(180deg);
}

.timeline__area-content {
  display: none;
  padding-bottom: 0.75rem;
}

.timeline__achievements {
  margin: 0;
}

.timeline__achievements li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline__achievements li i {
  color: var(--accent-cyan);
  margin-top: 0.2rem;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ========== EDUCATION SECTION ========== */
.education-section {
  padding: var(--section-gap) 0;
  background: var(--bg-primary);
}

.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
}

.education-card:hover {
  border-color: var(--border-hover);
}

.education-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-cyan-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.education-card__title {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
}

.education-card__school {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
}

.education-card__type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent-amber);
  background: var(--accent-amber-dim);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.education-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

/* ========== CONTACT SECTION ========== */
.contact-section {
  padding: var(--section-gap) 0;
  background: var(--bg-secondary);
  position: relative;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-cyan-dim), transparent);
}

.contact-wrapper {
  max-width: 650px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.contact-form__row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form__label {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: var(--text-tertiary);
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

.contact-form__textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form__submit {
  width: 100%;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
}

.contact-form__submit:hover {
  background: #67e8f9;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.3);
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  display: none;
  font-size: 0.9rem;
}

.form-message--success {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-message--error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.88rem;
  transition: var(--transition);
  margin: 0;
}

.social-link:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.social-link span {
  display: none;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  text-align: center;
}

.footer__nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer__link {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin: 0;
  transition: var(--transition-fast);
}

.footer__link:hover {
  color: var(--accent-cyan);
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: var(--transition);
  margin: 0;
}

.footer__social-link:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.footer__copyright {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  margin: 0;
}

.footer__built {
  color: var(--text-tertiary);
  font-size: 0.7rem;
  margin-top: 0.35rem;
  opacity: 0.6;
}

/* ========== RESPONSIVE ========== */

/* Large phones (480px+) */
@media (min-width: 480px) {
  .hero__headshot {
    width: 160px;
    height: 160px;
  }

  .hero__cta-group {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .project-card__image {
    height: 220px;
  }

  .social-link span {
    display: inline;
  }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
  .hero {
    padding: 4rem 2rem;
  }

  .hero__headshot {
    width: 180px;
    height: 180px;
  }

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

  .project-card__image {
    height: 240px;
  }

  .skill-bar {
    height: 8px;
  }

  .contact-form__row {
    flex-direction: row;
  }

  .contact-form__submit {
    width: auto;
    align-self: center;
    padding: 1rem 3rem;
  }

  .container {
    padding: 0 2.5rem;
  }

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

/* Laptops (1024px+) */
@media (min-width: 1024px) {
  .hero {
    padding: 6rem 2rem;
  }

  .hero__headshot {
    width: 180px;
    height: 180px;
  }

  .project-card__image {
    height: 280px;
  }

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

  .skill-bar {
    height: 8px;
  }

  /* Timeline alternating layout */
  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  /* First item (current role) spans full width */
  .timeline__item:first-child {
    width: 100%;
    padding-left: 3rem;
    padding-right: 0;
  }

  .timeline__item:first-child::before {
    left: calc(50% - 5px);
  }

  /* Remaining items alternate */
  .timeline__item:not(:first-child) {
    width: 50%;
    padding-left: 0;
  }

  .timeline__item:not(:first-child):nth-child(even) {
    padding-right: 3rem;
    margin-left: 0;
  }

  .timeline__item:not(:first-child):nth-child(even)::before {
    left: auto;
    right: -6px;
    transform: translateX(50%);
  }

  .timeline__item:not(:first-child):nth-child(odd) {
    margin-left: 50%;
    padding-left: 3rem;
  }

  .timeline__item:not(:first-child):nth-child(odd)::before {
    left: -6px;
    transform: translateX(-50%);
  }

  .floating-nav {
    display: flex;
  }
}

/* Desktops (1440px+) */
@media (min-width: 1440px) {
  .container {
    max-width: 1300px;
  }
}

/* Hide floating nav on small screens */
@media (max-width: 1023px) {
  .floating-nav {
    display: none;
  }
}

/* Touch device adjustments */
@media (hover: none) {
  .project-card:hover,
  .skill-item:hover {
    transform: none;
    border-color: var(--border);
  }
}

@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
  }

  .project-card:hover::before {
    opacity: 1;
  }

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

}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__gradient-orb { display: none; }
  .scroll-indicator__wheel { animation: none; }
}
