/* ==========================================================================
   Personal website — shared styles
   Palette: black, dark grey, dark blue, cream, white
   ========================================================================== */

:root {
  --bg: #0a0c10;
  --bg-alt: #0e121a;
  --surface: #141923;
  --surface-2: #1b2130;
  --border: #252c3a;
  --navy: #14254a;
  --navy-light: #2a4a85;
  --cream: #ece3cf;
  --cream-dim: #c9bfa8;
  --white: #f6f5f1;
  --text: #e4e3de;
  --muted: #959cab;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --nav-height: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  color: var(--cream);
  letter-spacing: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
}

/* ---------- Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--white);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--navy);
  border: 1px solid var(--navy-light);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--cream);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--white);
  background: var(--surface);
}

.nav-links a.active {
  color: var(--cream);
}

.nav-links a.nav-cta {
  margin-left: 8px;
  color: var(--bg);
  background: var(--cream);
  font-weight: 500;
}

.nav-links a.nav-cta:hover {
  background: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 0;
  place-items: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  position: relative;
  transition: transform 0.25s var(--ease), background 0.25s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-open .nav-toggle span {
  background: transparent;
}

.nav-open .nav-toggle span::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--cream-dim);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cream);
  font-weight: 500;
  font-size: 0.95rem;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Page sections ---------- */

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0;
}

.page-header {
  padding: 88px 0 48px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 80% at 85% 0%, rgba(42, 74, 133, 0.22), transparent 70%),
    var(--bg);
}

.page-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 14px;
}

.page-header p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0;
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  padding: 120px 0 104px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 80% 10%, rgba(42, 74, 133, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgba(20, 37, 74, 0.35), transparent 70%),
    var(--bg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(20, 25, 35, 0.7);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6fbf8a;
  box-shadow: 0 0 0 4px rgba(111, 191, 138, 0.15);
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 820px;
}

.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-meta div {
  display: flex;
  flex-direction: column;
}

.hero-meta strong {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--white);
}

.hero-meta span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Quick links (home) ---------- */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.quick-card:hover {
  border-color: var(--navy-light);
  transform: translateY(-3px);
}

.quick-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--navy);
  display: grid;
  place-items: center;
  color: var(--cream);
  margin-bottom: 20px;
}

.quick-card .icon svg {
  width: 20px;
  height: 20px;
}

.quick-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.quick-card p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.quick-card .text-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.quick-card:hover .text-link svg {
  transform: translateX(3px);
}

/* ---------- Skills strip ---------- */

.skills-wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
}

.skills-wrap h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.skill-group h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 14px;
}

.skill-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-group li {
  color: var(--text);
  font-size: 0.97rem;
}

/* ---------- Tags ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--cream-dim);
}

/* ---------- Project cards ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.project-card:hover {
  border-color: var(--navy-light);
  transform: translateY(-3px);
}

.project-card.hidden {
  display: none;
}

.project-thumb {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--border);
  color: var(--cream-dim);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-thumb svg {
  width: 44px;
  height: 44px;
  opacity: 0.85;
}

.project-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.project-thumb.v2 {
  background: linear-gradient(135deg, #1d2333 0%, var(--navy) 100%);
}

.project-thumb.v3 {
  background: linear-gradient(135deg, #2a2722 0%, #161a24 100%);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.project-body .project-type {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.project-body h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.project-body p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.project-body .tags {
  margin-bottom: 20px;
}

.project-links {
  display: flex;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text);
  transition: color 0.2s;
}

.project-links a:hover {
  color: var(--cream);
}

.project-links svg {
  width: 16px;
  height: 16px;
}

/* ---------- Filters ---------- */

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

.filter-btn {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--white);
  border-color: var(--muted);
}

.filter-btn.active {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--bg);
}

/* ---------- Timeline ---------- */

.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.timeline-toolbar .filters {
  margin: 0;
}

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--navy-light), var(--border));
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item.hidden {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--navy-light);
  display: grid;
  place-items: center;
}

.timeline-marker::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream);
}

.timeline-item[data-type="education"] .timeline-marker {
  border-color: var(--cream-dim);
}

.timeline-item[data-type="education"] .timeline-marker::after {
  background: var(--navy-light);
}

.timeline-card {
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.timeline-card h3 {
  font-size: 1.2rem;
  margin: 0;
}

.timeline-date {
  font-size: 0.88rem;
  color: var(--cream-dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.timeline-org {
  color: var(--text);
  font-weight: 500;
  margin-bottom: 14px;
}

.timeline-org .muted {
  font-weight: 400;
}

.type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  background: var(--navy);
  color: var(--cream);
}

.type-badge.edu {
  background: var(--cream);
  color: var(--bg);
}

.timeline-card ul {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--muted);
}

.timeline-card ul.tags {
  padding-left: 0;
}

.timeline-card ul:last-child {
  margin-bottom: 0;
}

.timeline-card li {
  margin-bottom: 6px;
}

.timeline-card li::marker {
  color: var(--navy-light);
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
}

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

.portrait-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 4 / 5;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--muted);
}

.portrait-caption strong {
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
}

.about-text h2 {
  font-size: 1.6rem;
}

.about-text > div + div {
  margin-top: 48px;
}

.about-text p {
  color: var(--muted);
  font-size: 1.04rem;
}

.about-text p.lead {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.6;
}

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.hobby-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.hobby-card .icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--cream);
  display: grid;
  place-items: center;
}

.hobby-card .icon svg {
  width: 20px;
  height: 20px;
}

.hobby-card h3 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.hobby-card p {
  font-size: 0.92rem;
  margin: 0;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 20px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.facts div {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.facts div:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.facts div:nth-last-child(-n + 2) {
  border-bottom: none;
}

.facts dt {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.facts dd {
  margin: 0;
  color: var(--white);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.5rem;
}

.contact-info > p {
  color: var(--muted);
}

.contact-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-list a,
.contact-list .contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.contact-list a:hover {
  border-color: var(--navy-light);
}

.contact-list .icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--navy);
  color: var(--cream);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contact-list .icon svg {
  width: 18px;
  height: 18px;
}

.contact-list small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.contact-list span {
  color: var(--white);
  font-size: 0.97rem;
}

.form-card {
  padding: 36px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.field label .req {
  color: var(--cream-dim);
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.97rem;
  color: var(--white);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23959cab' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5f6676;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(42, 74, 133, 0.3);
}

.field.invalid input,
.field.invalid textarea {
  border-color: #c8705f;
}

.field-error {
  font-size: 0.82rem;
  color: #e09484;
  margin-top: 6px;
  min-height: 0;
}

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

.form-footer .muted {
  font-size: 0.85rem;
  margin: 0;
}

.form-status {
  display: none;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.form-status.success {
  display: block;
  background: rgba(111, 191, 138, 0.1);
  border: 1px solid rgba(111, 191, 138, 0.35);
  color: #a9dcb9;
}

.form-status.error {
  display: block;
  background: rgba(200, 112, 95, 0.1);
  border: 1px solid rgba(200, 112, 95, 0.35);
  color: #e09484;
}

/* ---------- CTA band ---------- */

.cta-band {
  padding: 56px;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(42, 74, 133, 0.45), transparent 70%),
    var(--navy);
  border: 1px solid var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-band h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 8px;
}

.cta-band p {
  color: var(--cream-dim);
  margin: 0;
  max-width: 520px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.socials {
  display: flex;
  gap: 8px;
}

.socials a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}

.socials a:hover {
  color: var(--cream);
  border-color: var(--cream-dim);
}

.socials svg {
  width: 17px;
  height: 17px;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    transition: none !important;
  }
}

/* ---------- Focus ---------- */

:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .project-grid,
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-wrap,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .portrait {
    position: static;
    max-width: 360px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s var(--ease);
  }

  .nav-open .nav-links {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .nav-links a.nav-cta {
    margin: 8px 0 0;
    text-align: center;
  }

  .section {
    padding: 72px 0;
  }

  .hero {
    padding: 80px 0 72px;
  }

  .hero-meta {
    gap: 28px;
    margin-top: 56px;
  }

  .project-grid,
  .quick-grid,
  .skill-groups,
  .hobby-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row {
    gap: 0;
  }

  .form-card {
    padding: 24px;
  }

  .cta-band {
    padding: 36px 28px;
  }

  .timeline {
    padding-left: 32px;
  }

  .timeline::before {
    left: 9px;
  }

  .timeline-marker {
    left: -32px;
    width: 20px;
    height: 20px;
  }

  .timeline-card {
    padding: 22px;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .facts div:nth-child(odd) {
    border-right: none;
  }

  .facts div:nth-last-child(2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 16px;
  }
}
