/* =====================================================
   DESIGN TOKENS
===================================================== */
:root {
  /* Colors */
  --bg-primary:    #F7F4EF;
  --bg-surface:    #FEFCF9;
  --bg-elevated:   #FFFFFF;
  --bg-dark:       #1C1917;

  --text-primary:  #1C1917;
  --text-secondary:#44403C;
  --text-muted:    #78716C;
  --text-inverse:  #F7F4EF;

  --accent:        #0D9488;
  --accent-dark:   #0F766E;
  --accent-light:  #CCFBF1;
  --accent-subtle: #F0FDFA;

  --border:        #E7E5E0;
  --border-strong: #C8C5BF;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Bricolage Grotesque', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --nav-height: 72px;
  --section-gap: clamp(80px, 10vw, 140px);

  /* Radii */
  --radius-sm:  4px;
  --radius-md:  10px;
  --radius-lg:  18px;
  --radius-xl:  28px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(28,25,23,0.07), 0 1px 2px rgba(28,25,23,0.05);
  --shadow-md:  0 4px 16px rgba(28,25,23,0.09), 0 2px 4px rgba(28,25,23,0.06);
  --shadow-lg:  0 12px 40px rgba(28,25,23,0.11), 0 4px 8px rgba(28,25,23,0.06);
  --shadow-accent: 0 8px 32px rgba(13,148,136,0.18);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 0.875rem + 0.3vw, 1.0625rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle grain texture on the background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }

.container {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.section {
  padding-block: var(--section-gap);
  position: relative;
  z-index: 1;
}

/* =====================================================
   REVEAL ANIMATIONS
===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* =====================================================
   TYPOGRAPHY HELPERS
===================================================== */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
  display: block;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
  line-height: 1.15;
  color: var(--text-primary);
  font-weight: 400;
}

.section-heading em {
  font-style: italic;
  color: var(--accent);
}

.section-header {
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 680px;
}

/* =====================================================
   BUTTONS
===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 36px rgba(13,148,136,0.28);
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.btn-full { width: 100%; justify-content: center; }

/* =====================================================
   NAV
===================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: rgba(247, 244, 239, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.nav-inner {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  margin-right: auto;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(28,25,23,0.06);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.2s;
}

/* =====================================================
   HERO
===================================================== */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-height);
  padding-inline: clamp(20px, 5vw, 48px);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Decorative background accent */
.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: clamp(300px, 45vw, 600px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  width: min(100%, 1160px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 2rem + 6vw, 7.5rem);
  line-height: 1.0;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.hero-name em {
  font-style: italic;
  color: var(--accent);
}

.hero-tagline {
  font-size: clamp(1rem, 0.85rem + 0.6vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Stats panel */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex-shrink: 0;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 130px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  line-height: 1;
  color: var(--text-primary);
  font-weight: 400;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* =====================================================
   ABOUT
===================================================== */
.about {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.about-visual {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}

.about-photo-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
}

.about-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--accent-light) 0%, var(--accent-subtle) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px dashed rgba(13,148,136,0.3);
}

.about-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.badge-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.about-badge strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.badge-roles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.badge-roles li {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  padding-left: 12px;
  position: relative;
}

.badge-roles li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-size: 0.75rem;
  color: var(--accent);
  top: 1px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.highlight {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: background 0.15s;
}

.highlight:last-child { border-bottom: none; }
.highlight:hover { background: var(--accent-subtle); }

.highlight-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.highlight span:last-child {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* =====================================================
   SKILLS
===================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.skill-domain {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.skill-domain:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.skill-domain:nth-child(1) { border-top: 3px solid var(--accent); }
.skill-domain:nth-child(2) { border-top: 3px solid #6366F1; }
.skill-domain:nth-child(3) { border-top: 3px solid #F59E0B; }
.skill-domain:nth-child(4) { border-top: 3px solid #EC4899; }

.skill-domain-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-icon { font-size: 1.375rem; }

.skill-domain-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: default;
}

.skill-tag:hover {
  background: var(--accent-subtle);
  color: var(--accent-dark);
  border-color: var(--accent-light);
}

.skill-tag--featured {
  background: var(--accent-subtle);
  color: var(--accent-dark);
  border-color: var(--accent-light);
  font-weight: 600;
}

/* =====================================================
   EXPERIENCE
===================================================== */
.experience {
  background: var(--bg-primary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 180px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  z-index: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding-block: 40px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: none; }

/* Timeline dot */
.timeline-item::after {
  content: '';
  position: absolute;
  left: 174px;
  top: 48px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
  z-index: 1;
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  padding-right: 40px;
  padding-top: 4px;
}

.timeline-date {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  line-height: 1.4;
}

.timeline-type {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  width: fit-content;
  margin-left: auto;
}

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.timeline-role {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.timeline-company {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  font-family: var(--font-mono);
}

.timeline-desc {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.9375rem;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}

.timeline-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
}

/* =====================================================
   EDUCATION
===================================================== */
.education-block {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.education-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  max-width: 540px;
}

.education-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.education-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.education-school {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* =====================================================
   PROJECTS
===================================================== */
.projects {
  background: var(--bg-dark);
  color: var(--text-inverse);
}

.projects .section-label { color: var(--accent-light); }

.projects .section-heading {
  color: var(--text-inverse);
}

.projects .section-heading em { color: var(--accent-light); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.project-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.project-card:hover {
  background: rgba(255,255,255,0.07);
  transform: translateY(-3px);
  border-color: rgba(13,148,136,0.35);
}

/* Featured card spans full width on large screens */
.project-card--featured {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto auto;
  gap: 12px 40px;
}

.project-card--featured .project-card-top { grid-column: 1; }
.project-card--featured .project-title { grid-column: 1; }
.project-card--featured .project-desc { grid-column: 1; }
.project-card--featured .project-impact {
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: rgba(13,148,136,0.08);
  border: 1px solid rgba(13,148,136,0.2);
  border-radius: var(--radius-md);
  min-width: 200px;
}

.project-card--featured .project-footer { grid-column: 1; }

/* Regular cards: 2 per row on mid, then 2+2 */
.project-card:not(.project-card--featured) {
  grid-column: span 6;
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-family: var(--font-mono);
}

.project-year {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.35);
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  font-weight: 400;
  color: var(--text-inverse);
  line-height: 1.25;
  flex: 1;
}

.project-desc {
  font-size: 0.9rem;
  color: rgba(247,244,239,0.65);
  line-height: 1.65;
  flex: 1;
}

/* Impact (default: horizontal row) */
.project-impact {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.impact-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.impact-item strong {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 400;
  color: var(--accent-light);
  line-height: 1;
}

.impact-item span {
  font-size: 0.75rem;
  color: rgba(247,244,239,0.5);
  font-weight: 500;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.project-tech span {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: rgba(247,244,239,0.45);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
}

/* =====================================================
   CONTACT
===================================================== */
.contact {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.contact-sub {
  color: var(--text-secondary);
  margin-top: 20px;
  margin-bottom: 36px;
  max-width: 380px;
  font-size: 0.9375rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  transition: all 0.18s;
}

.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent-light);
  background: var(--accent-subtle);
  transform: translateX(4px);
}

.contact-link svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.18s;
}

.contact-link:hover svg { color: var(--accent); }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group:has(:focus-within) input,
.form-group:has(:focus-within) textarea {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}

.form-group input.input-error,
.form-group textarea.input-error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}

.field-error {
  font-size: 0.8rem;
  color: #DC2626;
  margin-top: 4px;
  display: block;
  min-height: 1em;
  font-weight: 500;
}

.form-error-banner {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #DC2626;
  font-weight: 500;
  line-height: 1.5;
}

/* =====================================================
   FOOTER
===================================================== */
.footer {
  background: var(--bg-dark);
  padding-block: 32px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--text-inverse);
  font-weight: 400;
}

.footer-role {
  font-size: 0.8125rem;
  color: rgba(247,244,239,0.45);
  font-family: var(--font-mono);
}

.footer-copy {
  margin-left: auto;
  font-size: 0.8125rem;
  color: rgba(247,244,239,0.3);
  font-family: var(--font-mono);
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 280px 1fr;
    gap: 48px;
  }

  .timeline::before { left: 0; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-left: 28px;
  }
  .timeline-item::after { left: -7px; top: 44px; }
  .timeline-meta { text-align: left; padding-right: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .timeline-type { margin-left: 0; }

  .project-card--featured {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .project-card--featured .project-impact {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    min-width: unset;
  }
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .stat-card {
    padding: 16px 12px;
    min-width: unset;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(247,244,239,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 4px;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 1rem; }
  .nav-hamburger { display: flex; }
  .nav > .nav-inner > .btn { display: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-visual { position: static; }
  .about-photo-wrap { max-height: 360px; aspect-ratio: 3/4; width: 60%; margin-inline: auto; }

  .contact-inner { grid-template-columns: 1fr; }

  .project-card:not(.project-card--featured) { grid-column: span 12; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .projects-grid { display: flex; flex-direction: column; }
  .project-card--featured .project-impact { flex-direction: row; flex-wrap: wrap; }
}
