/* ============================================================
   Aamir Mithaiwala — website styles
   Classic & professional theme
   ============================================================ */

:root {
  --navy: #16233b;
  --navy-light: #263a5c;
  --gold: #b8935f;
  --gold-dark: #9c7842;
  --cream: #faf7f1;
  --paper: #ffffff;
  --ink: #23262b;
  --muted: #6b7280;
  --line: #e7e0d5;

  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;

  --container: 1100px;
  --radius: 6px;
  --shadow: 0 8px 30px rgba(22, 35, 59, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
}

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

a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin: 0 0 0.6em;
}

.lead { font-size: 1.15rem; color: #3a3f47; }
.muted { color: var(--muted); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; color: var(--gold-dark); }

.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { text-decoration: none; border-bottom-color: var(--gold); color: var(--gold-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--navy);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.05s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.bg-paper { background: var(--paper); }
.bg-navy { background: var(--navy); color: #eef1f6; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy .lead { color: #cdd6e4; }

.center { text-align: center; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---------- Hero (photo banner) ---------- */
.hero-banner {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  padding: 90px 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 26, 44, 0.45), rgba(18, 26, 44, 0.66));
  z-index: 1;
}
.hero-banner .container { position: relative; z-index: 2; }

/* Animated LineWaves background variant */
.hero-waves {
  background: radial-gradient(120% 120% at 50% 35%, #16233b 0%, #0c1322 60%, #080d18 100%);
}
.line-waves-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.line-waves-bg canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
/* Softer overlay for the waves version, plus a centered glow for text legibility */
.hero-waves .hero-overlay {
  background:
    radial-gradient(60% 55% at 50% 50%, rgba(8, 13, 24, 0.55) 0%, rgba(8, 13, 24, 0) 70%),
    linear-gradient(rgba(8, 13, 24, 0.15), rgba(8, 13, 24, 0.35));
}

/* ---------- Cinematic photo hero (home) ---------- */
.hero-cinematic {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  padding: 90px 0;
}
.hero-slideshow { position: absolute; inset: 0; z-index: 0; background: #0a0f19; }
.hero-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: heroKen 27s infinite;
  will-change: opacity, transform;
}
.hero-slideshow img:nth-child(1) { animation-delay: 0s; }
.hero-slideshow img:nth-child(2) { animation-delay: 9s; }
.hero-slideshow img:nth-child(3) { animation-delay: 18s; }
@keyframes heroKen {
  0%   { opacity: 0; transform: scale(1.05); }
  3%   { opacity: 1; }
  30%  { opacity: 1; }
  36%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.13); }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(9,14,24,0.82) 0%, rgba(9,14,24,0.5) 42%, rgba(9,14,24,0.12) 100%),
    linear-gradient(0deg, rgba(9,14,24,0.55) 0%, rgba(9,14,24,0) 45%);
}
.hero-cinematic .container { position: relative; z-index: 2; }
.hero-content { max-width: 660px; }
.hero-content h1 {
  color: #fff;
  font-size: clamp(2.7rem, 7vw, 5rem);
  line-height: 1.03;
  text-shadow: 0 3px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.2em;
}
.hero-content .eyebrow { color: #e9c589; }
.hero-content .hero-rule { margin: 20px 0 24px; }
.hero-content .lead {
  color: #eef1f6;
  font-size: 1.3rem;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
  max-width: 560px;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  opacity: 0.85;
  text-decoration: none;
  animation: cueBounce 2s infinite;
}
.scroll-cue:hover { opacity: 1; text-decoration: none; }
@keyframes cueBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow img { animation: none; opacity: 0; transform: none; }
  .hero-slideshow img:nth-child(1) { opacity: 1; }
  .scroll-cue { animation: none; }
}
@media (max-width: 640px) {
  .hero-content .lead { font-size: 1.12rem; }
}
.hero-banner h1 {
  color: #fff;
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  margin-bottom: 0.3em;
}
.hero-banner .eyebrow { color: #f1d9b0; }
.hero-banner .lead {
  color: #f3ede3;
  font-size: 1.25rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  max-width: 640px;
  margin: 0 auto;
}
.hero-rule {
  width: 64px;
  height: 3px;
  background: var(--gold);
  border: 0;
  margin: 22px auto 26px;
}
.hero-banner .btn-row { justify-content: center; }

/* ---------- About / feature cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

/* ---------- Gallery (uniform grid — every photo the same tidy size) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery figure {
  margin: 0;
  background: #f1ede4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery figure:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(22, 35, 59, 0.14); }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  display: block;
  cursor: pointer;
}
.gallery img.missing { cursor: default; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius); }

/* ---------- Contact ---------- */
.contact-info { display: grid; gap: 8px; font-size: 1.1rem; }
.contact-info strong { color: #fff; }

/* Contact form (sits on the dark navy section) */
.contact-form { max-width: 520px; margin: 26px auto 0; text-align: left; }
.contact-form .field-row { display: flex; gap: 14px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #b9c4d6; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.12);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .btn { width: 100%; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  max-width: 520px;
  margin: 0 auto 6px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.form-ok  { background: rgba(76, 175, 120, 0.18); color: #d6f3e2; border: 1px solid rgba(76, 175, 120, 0.5); }
.form-err { background: rgba(200, 80, 80, 0.18); color: #f6d6d6; border: 1px solid rgba(200, 80, 80, 0.5); }

@media (max-width: 520px) {
  .contact-form .field-row { flex-direction: column; gap: 0; }
}

/* ---------- Blog ---------- */
.posts { max-width: 760px; margin: 0 auto; }
.post {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}
.post-date {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin: 0 0 6px;
}
.post-title { margin: 0 0 12px; }
.post-body p { margin: 0 0 1em; }
.post-body p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #cdd6e4;
  padding: 44px 0;
  text-align: center;
}
.site-footer .brand-foot {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: #fff;
  display: block;
  margin-bottom: 10px;
}
.site-footer a { color: var(--gold); }
.footer-links { margin: 10px 0; }
.footer-links a { margin: 0 10px; }

/* ---------- Notice box (for placeholders / instructions) ---------- */
.notice {
  background: #fff8ec;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.92rem;
  color: #6b5836;
  margin-top: 22px;
}

/* ---------- CV page ---------- */
.cv-image {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #fff;
}
.cv-image img { width: 100%; height: auto; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { max-width: 360px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  section { padding: 56px 0; }
}

/* ============================================================
   Blueprint components
   ============================================================ */

/* Active nav + navy eyebrow */
.site-nav a.active { border-bottom-color: var(--gold); color: var(--gold-dark); }
.bg-navy .eyebrow { color: var(--gold); }

/* Home hero (navy) */
.hero-home { background: var(--navy); color: #fff; padding: 112px 0 100px; }
.hero-home h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 0.12em; }
.hero-tagline { color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: clamp(1.3rem, 3.4vw, 2rem); margin: 0 0 0.5em; }
.hero-sub { color: #cdd6e4; font-size: 1.15rem; max-width: 560px; margin: 0 auto 28px; }

/* About Me (two columns) */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.about-text { text-align: left; }
.about-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Page head with gold rule */
.page-head h1 { margin-bottom: 0; }
.title-rule { width: 70px; height: 3px; background: var(--gold); border: 0; margin: 14px auto 0; }

/* Filter tabs */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 26px; }
.filter-tab { background: #efe9dd; color: var(--navy); border: 1px solid var(--line); border-radius: 20px; padding: 7px 16px; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.filter-tab:hover { background: #e7dcc8; }
.filter-tab.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.gallery figure.hide { display: none; }

/* Gallery "spaces" (named collections) */
.gallery-space { margin-bottom: 48px; }
.gallery-space:last-child { margin-bottom: 0; }
.space-head { margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.space-title { font-size: 1.5rem; color: var(--navy); margin: 0; scroll-margin-top: 90px; }
.space-desc { margin: 7px 0 0; color: var(--muted); max-width: 680px; line-height: 1.55; }

/* Freeform custom layout (from the layout builder) */
.freeform-board { position: relative; width: 100%; aspect-ratio: 2 / 3; margin: 6px 0 24px; }
.ff-item { position: absolute; margin: 0; }
.ff-item img { width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: transform 0.25s ease; }
.ff-item:hover img { transform: scale(1.02); }

/* 4-up grid + work cards */
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.work-card { text-align: center; }
.work-card h3 { margin-bottom: 4px; }

/* Project cards */
.project-card { padding: 0; overflow: hidden; }
.project-card .project-img img { width: 100%; height: 190px; object-fit: cover; display: block; }
.project-card h3 { margin: 22px 26px 3px; }
.project-card .project-sub { margin: 0 26px 12px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--gold-dark); }
.project-card p { margin: 0 26px 14px; }
.project-card p:last-child { margin-bottom: 22px; }
.club-past { opacity: 1; }
.year-heading { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); margin: 30px 0 16px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }

/* Blog list */
.post-list { max-width: 820px; margin: 0 auto; }
.post-row { display: flex; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-thumb { flex: 0 0 165px; height: 120px; border-radius: var(--radius); overflow: hidden; background: #ece6db; display: flex; align-items: center; justify-content: center; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { color: #b3a488; }
.post-main { flex: 1; min-width: 0; }
.post-title { font-size: 1.3rem; margin: 0 0 5px; }
.post-title a { color: var(--navy); }
.post-title a:hover { color: var(--gold-dark); text-decoration: none; }
.post-meta { font-size: 0.85rem; color: var(--muted); margin: 0 0 9px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-meta .tag { background: #efe9dd; color: var(--gold-dark); border-radius: 12px; padding: 2px 10px; font-size: 0.78rem; font-weight: 600; }
.post-excerpt { margin: 0 0 11px; color: #4a4f57; }
.read-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; color: var(--gold-dark); }
.read-more:hover { text-decoration: none; color: var(--navy); }
.read-more svg { width: 16px; height: 16px; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 34px; }
.pagination a { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); text-decoration: none; }
.pagination a:hover { border-color: var(--gold); }
.pagination a.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.pagination a.next svg { width: 15px; height: 15px; }

/* Single post */
.post-single h1 { margin-bottom: 6px; }
.post-hero { margin: 22px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-hero img { width: 100%; display: block; }
.post-content { font-size: 1.06rem; line-height: 1.8; }
.post-content p { margin: 0 0 1.1em; }
.post-content ul { margin: 0 0 1.1em 1.2em; }
.post-content li { margin: 0.35em 0; }

/* CV page */
.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; }
.cv-block { margin-bottom: 30px; }
.cv-block h3 { margin-bottom: 2px; }
.cv-download { margin-top: 18px; }
.cv-download svg { width: 18px; height: 18px; }
.cv-list { list-style: none; padding: 0; margin: 8px 0 0; }
.cv-list li { position: relative; padding: 7px 0 7px 22px; border-bottom: 1px solid var(--line); }
.cv-list li:last-child { border-bottom: 0; }
.cv-list li::before { content: ""; position: absolute; left: 0; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.highlights { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.highlight { display: flex; gap: 14px; align-items: flex-start; }
.hl-icon { flex: 0 0 42px; height: 42px; border-radius: 50%; background: #f3ead9; color: var(--gold-dark); display: flex; align-items: center; justify-content: center; }
.highlight h4 { margin: 0 0 2px; color: var(--navy); font-size: 1.02rem; }
.highlight p { margin: 0; color: #4a4f57; font-size: 0.94rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.skill { background: #f3ead9; color: var(--gold-dark); border-radius: 20px; padding: 7px 15px; font-size: 0.88rem; font-weight: 600; }

/* CV — balanced card layout */
.cv-highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 30px 0 34px; }
.highlight-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px 18px; text-align: center; box-shadow: var(--shadow); }
.highlight-card .hl-icon { margin: 0 auto 12px; }
.highlight-card h4 { margin: 0 0 4px; color: var(--navy); font-size: 1.02rem; }
.highlight-card p { margin: 0; color: #4a4f57; font-size: 0.9rem; line-height: 1.5; }
.cv-cards { column-count: 2; column-gap: 26px; }
.cv-card { break-inside: avoid; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; box-shadow: var(--shadow); margin: 0 0 26px; }
.cv-card .eyebrow { margin-bottom: 12px; }
.cv-card h3 { margin-bottom: 2px; }
.cv-card .cv-list li:first-child { padding-top: 2px; }
@media (max-width: 860px) { .cv-cards { column-count: 1; } .cv-highlights { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .cv-highlights { grid-template-columns: 1fr; } }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact-info-col h1 { margin-bottom: 0.15em; }
.contact-list { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 20px; }
.contact-list li { display: flex; gap: 15px; align-items: center; }
.ci-icon { flex: 0 0 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.ci-label { display: block; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.contact-list a { color: var(--ink); }
.contact-list a:hover { color: var(--gold-dark); }

/* Contact form: light by default, dark on navy sections */
.contact-form input, .contact-form textarea { background: #fff; color: var(--ink); border: 1px solid #cfd6e2; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #9aa1ac; }
.bg-navy .contact-form input, .bg-navy .contact-form textarea { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.25); }
.bg-navy .contact-form input::placeholder, .bg-navy .contact-form textarea::placeholder { color: #b9c4d6; }

/* Footer */
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-social { display: flex; gap: 14px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; color: #cdd6e4; }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: #fff; text-decoration: none; }
.footer-copy { color: #7d8ba3; font-size: 0.85rem; margin: 0; }

@media (max-width: 860px) {
  .about-grid, .cv-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .post-row { flex-direction: column; gap: 12px; }
  .post-thumb { flex-basis: auto; width: 100%; height: 190px; }
}

/* Anchor links land below the sticky header */
section[id], .cv-card[id], .cv-block[id] { scroll-margin-top: 90px; }

/* Multi-column footer */
.site-footer { padding: 58px 0 28px; text-align: left; }
.footer-top { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand-foot { display: block; margin-bottom: 14px; }
.footer-tagline { color: #aebbcf; max-width: 320px; margin: 0 0 20px; font-size: 0.95rem; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 14px; }
.footer-col a { display: block; color: #aebbcf; text-decoration: none; padding: 6px 0; font-size: 0.95rem; }
.footer-col a:hover { color: var(--gold); text-decoration: none; }
.footer-divider { border: 0; border-top: 1px solid rgba(255,255,255,0.12); margin: 40px 0 20px; }
.footer-copy { color: #7d8ba3; font-size: 0.85rem; text-align: center; margin: 0; }

@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ============================================================
   Animations & interaction polish
   (Added on top — nothing above this line was changed.)
   ============================================================ */

/* ---------- Scroll reveal ----------
   Elements start hidden only when "reveal-armed" is set (see header.php),
   so if JavaScript is off, everything stays fully visible.
   The list below MUST match the selector list inside script.js. */
html.reveal-armed .about-text,
html.reveal-armed .about-photo,
html.reveal-armed .page-head,
html.reveal-armed .space-head,
html.reveal-armed .card,
html.reveal-armed .highlight-card,
html.reveal-armed .cv-card,
html.reveal-armed .gallery figure,
html.reveal-armed .post-row,
html.reveal-armed .post-single,
html.reveal-armed .contact-info-col,
html.reveal-armed .contact-form-col,
html.reveal-armed .stat,
html.reveal-armed .year-heading,
html.reveal-armed .border-glow-card {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.65, 0.3, 1),
              transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1);
  will-change: opacity, transform;
}
/* Directional entrance for the home About columns (bold, eye-catching). */
html.reveal-armed .about-text  { transform: translateX(-46px); }
html.reveal-armed .about-photo { transform: translateX(46px) scale(0.98); }
/* Revealed state (JS adds .reveal-in when the element scrolls into view). */
html.reveal-armed .reveal-in { opacity: 1 !important; transform: none !important; }

/* ---------- Hero entrance (home) ---------- */
.hero-home h1      { animation: heroUp 0.85s 0.05s both cubic-bezier(0.2, 0.65, 0.3, 1); }
.hero-home .hero-tagline { animation: heroUp 0.85s 0.18s both cubic-bezier(0.2, 0.65, 0.3, 1); }
.hero-home .hero-sub     { animation: heroUp 0.85s 0.30s both cubic-bezier(0.2, 0.65, 0.3, 1); }
.hero-home .btn          { animation: heroUp 0.85s 0.42s both cubic-bezier(0.2, 0.65, 0.3, 1); }
@keyframes heroUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Hover & button polish ---------- */
.btn {
  transition: transform 0.14s ease, background 0.2s ease,
              box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(22, 35, 59, 0.16); }
.btn:active { transform: translateY(0);    box-shadow: none; }
.btn-gold:hover { box-shadow: 0 8px 22px rgba(184, 147, 95, 0.45); filter: brightness(1.03); }

/* Cards lift on hover */
.card, .highlight-card, .cv-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card:hover, .highlight-card:hover, .cv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(22, 35, 59, 0.16);
}

/* Photos gently zoom inside their frame */
.project-card .project-img { overflow: hidden; }
.project-card .project-img img { transition: transform 0.5s ease; }
.project-card:hover .project-img img { transform: scale(1.07); }
.gallery img { transition: transform 0.5s ease, box-shadow 0.25s ease; }
.gallery figure:hover img { transform: scale(1.06); }

/* Animated sliding underline on the main nav */
.site-nav a { position: relative; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }
.site-nav a:hover        { border-bottom-color: transparent; }
.site-nav a.active       { border-bottom-color: transparent; }

/* "Read more" arrows slide, download icon nudges */
.read-more svg, .cv-download svg { transition: transform 0.2s ease; }
.read-more:hover svg { transform: translateX(4px); }

/* Skill / hobby chips */
.skill { transition: transform 0.18s ease, background 0.2s ease, color 0.2s ease; }
.skill:hover { transform: translateY(-2px); background: var(--gold); color: #fff; }

/* Filter tabs + pagination micro-interactions */
.filter-tab { transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease; }
.filter-tab:hover { transform: translateY(-2px); }
.pagination a { transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease; }
.pagination a:hover { transform: translateY(-2px); }

/* Footer social icons pop */
.footer-social a { transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.footer-social a:hover { transform: translateY(-3px); }

/* Contact icons pop when their row is hovered */
.contact-list li .ci-icon { transition: transform 0.2s ease; }
.contact-list li:hover .ci-icon { transform: scale(1.08); }

/* ---------- "At a Glance" counters band (home) ---------- */
.stats-band {
  background: linear-gradient(135deg, #16233b 0%, #1f3253 100%);
  color: #eef1f6;
  border-top: 3px solid var(--gold);
  padding: 60px 0;
}
.stats-band .eyebrow { color: var(--gold); text-align: center; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  margin-top: 10px;
}
.stat { padding: 12px 8px; }
.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--gold);
  font-size: clamp(2.7rem, 6vw, 3.9rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 600;
  color: #cdd6e4;
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px 16px; }
}

/* ---------- Respect "reduce motion" everywhere ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-home h1, .hero-home .hero-tagline, .hero-home .hero-sub, .hero-home .btn { animation: none; }
  .btn:hover, .card:hover, .highlight-card:hover, .cv-card:hover,
  .filter-tab:hover, .pagination a:hover, .footer-social a:hover,
  .skill:hover { transform: none; }
  .project-card:hover .project-img img, .gallery figure:hover img { transform: none; }
  html.reveal-armed .about-text, html.reveal-armed .about-photo,
  html.reveal-armed .page-head, html.reveal-armed .space-head,
  html.reveal-armed .card, html.reveal-armed .highlight-card,
  html.reveal-armed .cv-card, html.reveal-armed .gallery figure,
  html.reveal-armed .post-row, html.reveal-armed .post-single,
  html.reveal-armed .contact-info-col, html.reveal-armed .contact-form-col,
  html.reveal-armed .stat, html.reveal-armed .year-heading,
  html.reveal-armed .border-glow-card {
    opacity: 1; transform: none; transition: none;
  }
}

/* ============================================================
   React Bits adaptations (rebuilt in plain CSS, navy/gold)
   ============================================================ */

/* ---------- 1) Pill navigation (adapted from PillNav) ---------- */
.site-nav {
  gap: 4px;
  background: var(--navy);
  border-radius: 9999px;
  padding: 5px 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 6px 18px rgba(22, 35, 59, 0.16);
}
.site-nav a.pill-link {
  position: relative;
  overflow: hidden;
  border-bottom: 0;
  border-radius: 9999px;
  padding: 8px 16px;
  color: #e7e0d5;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: color 0.35s ease;
}
.site-nav a.pill-link::after { display: none; } /* remove the old sliding underline */
.pill-link .pill-fill {
  position: absolute;
  inset: 0;
  background: var(--gold);
  border-radius: inherit;      /* exact pill shape, no more oval */
  transform: scale(0);
  transform-origin: 50% 100%;  /* blooms up from the bottom */
  z-index: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.pill-link .nav-label { position: relative; z-index: 1; }
.site-nav a.pill-link:hover,
.site-nav a.pill-link.active { color: var(--navy); border-bottom-color: transparent; }
.site-nav a.pill-link:hover .pill-fill,
.site-nav a.pill-link.active .pill-fill { transform: scale(1); }

/* Pill nav on mobile: a rounded navy panel instead of the plain dropdown */
@media (max-width: 860px) {
  .site-nav {
    top: 66px;
    left: 16px;
    right: 16px;
    border-radius: 16px;
    border-bottom: 0;
    padding: 8px;
    gap: 4px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  }
  .site-nav a.pill-link {
    padding: 13px 18px;
    border-bottom: 0;
    text-align: center;
    font-size: 0.95rem;
  }
}

/* ---------- 2) BorderGlow cards (adapted for Projects & Clubs) ---------- */
.border-glow-card {
  /* cursor-driven variables (updated by script.js) */
  --edge-proximity: 0;
  --cursor-angle: 45deg;
  --edge-sensitivity: 22;
  --color-sensitivity: calc(var(--edge-sensitivity) + 20);
  --border-radius: 14px;
  --glow-padding: 30px;
  --cone-spread: 25;
  --fill-opacity: 0.5;
  --card-bg: var(--navy);

  /* gold / navy mesh gradient (replaces the original rainbow) */
  --gradient-one:   radial-gradient(at 80% 55%, #b8935f 0px, transparent 50%);
  --gradient-two:   radial-gradient(at 69% 34%, #e9c589 0px, transparent 50%);
  --gradient-three: radial-gradient(at 8% 6%,   #2c4570 0px, transparent 50%);
  --gradient-four:  radial-gradient(at 41% 38%, #b8935f 0px, transparent 50%);
  --gradient-five:  radial-gradient(at 86% 85%, #e9c589 0px, transparent 50%);
  --gradient-six:   radial-gradient(at 82% 18%, #2c4570 0px, transparent 50%);
  --gradient-seven: radial-gradient(at 51% 4%,  #e9c589 0px, transparent 50%);
  --gradient-base:  linear-gradient(#b8935f 0 100%);

  /* gold glow */
  --glow-color:    hsl(38deg 58% 62% / 100%);
  --glow-color-60: hsl(38deg 58% 62% / 60%);
  --glow-color-50: hsl(38deg 58% 62% / 50%);
  --glow-color-40: hsl(38deg 58% 62% / 40%);
  --glow-color-30: hsl(38deg 58% 62% / 30%);
  --glow-color-20: hsl(38deg 58% 62% / 20%);
  --glow-color-10: hsl(38deg 58% 62% / 10%);

  position: relative;
  border-radius: var(--border-radius);
  isolation: isolate;
  transform: translate3d(0, 0, 0.01px);
  display: grid;
  border: 1px solid rgb(255 255 255 / 12%);
  background: var(--card-bg);
  overflow: visible;
  box-shadow:
    rgba(0, 0, 0, 0.10) 0px 2px 4px,
    rgba(0, 0, 0, 0.10) 0px 8px 16px,
    rgba(0, 0, 0, 0.10) 0px 16px 32px;
}
.border-glow-card::before,
.border-glow-card::after,
.border-glow-card > .edge-light {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transition: opacity 0.25s ease-out;
  z-index: -1;
}
.border-glow-card:not(:hover):not(.sweep-active)::before,
.border-glow-card:not(:hover):not(.sweep-active)::after,
.border-glow-card:not(:hover):not(.sweep-active) > .edge-light {
  opacity: 0;
  transition: opacity 0.75s ease-in-out;
}
.border-glow-card::before {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card-bg) 0 100%) padding-box,
    linear-gradient(rgb(255 255 255 / 0%) 0% 100%) border-box,
    var(--gradient-one) border-box,
    var(--gradient-two) border-box,
    var(--gradient-three) border-box,
    var(--gradient-four) border-box,
    var(--gradient-five) border-box,
    var(--gradient-six) border-box,
    var(--gradient-seven) border-box,
    var(--gradient-base) border-box;
  opacity: calc((var(--edge-proximity) - var(--color-sensitivity)) / (100 - var(--color-sensitivity)));
  mask-image:
    conic-gradient(
      from var(--cursor-angle) at center,
      black calc(var(--cone-spread) * 1%),
      transparent calc((var(--cone-spread) + 15) * 1%),
      transparent calc((100 - var(--cone-spread) - 15) * 1%),
      black calc((100 - var(--cone-spread)) * 1%)
    );
}
.border-glow-card::after {
  border: 1px solid transparent;
  background:
    var(--gradient-one) padding-box,
    var(--gradient-two) padding-box,
    var(--gradient-three) padding-box,
    var(--gradient-four) padding-box,
    var(--gradient-five) padding-box,
    var(--gradient-six) padding-box,
    var(--gradient-seven) padding-box,
    var(--gradient-base) padding-box;
  mask-image:
    linear-gradient(to bottom, black, black),
    radial-gradient(ellipse at 50% 50%, black 40%, transparent 65%),
    radial-gradient(ellipse at 66% 66%, black 5%, transparent 40%),
    radial-gradient(ellipse at 33% 33%, black 5%, transparent 40%),
    radial-gradient(ellipse at 66% 33%, black 5%, transparent 40%),
    radial-gradient(ellipse at 33% 66%, black 5%, transparent 40%),
    conic-gradient(from var(--cursor-angle) at center, transparent 5%, black 15%, black 85%, transparent 95%);
  mask-composite: subtract, add, add, add, add, add;
  opacity: calc(var(--fill-opacity) * (var(--edge-proximity) - var(--color-sensitivity)) / (100 - var(--color-sensitivity)));
  mix-blend-mode: soft-light;
}
.border-glow-card > .edge-light {
  inset: calc(var(--glow-padding) * -1);
  pointer-events: none;
  z-index: 1;
  mask-image:
    conic-gradient(from var(--cursor-angle) at center, black 2.5%, transparent 10%, transparent 90%, black 97.5%);
  opacity: calc((var(--edge-proximity) - var(--edge-sensitivity)) / (100 - var(--edge-sensitivity)));
  mix-blend-mode: plus-lighter;
}
.border-glow-card > .edge-light::before {
  content: "";
  position: absolute;
  inset: var(--glow-padding);
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--glow-color),
    inset 0 0 1px 0 var(--glow-color-60),
    inset 0 0 3px 0 var(--glow-color-50),
    inset 0 0 6px 0 var(--glow-color-40),
    inset 0 0 15px 0 var(--glow-color-30),
    inset 0 0 25px 2px var(--glow-color-20),
    inset 0 0 50px 2px var(--glow-color-10),
    0 0 1px 0 var(--glow-color-60),
    0 0 3px 0 var(--glow-color-50),
    0 0 6px 0 var(--glow-color-40),
    0 0 15px 0 var(--glow-color-30),
    0 0 25px 2px var(--glow-color-20),
    0 0 50px 2px var(--glow-color-10);
}
.border-glow-inner {
  position: relative;
  z-index: 1;
  border-radius: inherit;
  overflow: hidden;
}
/* Content styling on the navy glow card */
.border-glow-card .border-glow-inner h3 { color: #fff; }
.border-glow-card .border-glow-inner p { color: #cdd6e4; }
.border-glow-card .border-glow-inner .project-sub { color: var(--gold); }
.border-glow-card .read-more { color: var(--gold); }
.border-glow-card .read-more:hover { color: #fff; }

/* Hide the glow on phones (kept as a clean navy card) */
@media (max-width: 768px) {
  .border-glow-card::before,
  .border-glow-card::after,
  .border-glow-card > .edge-light { display: none; }
  .border-glow-card {
    box-shadow: var(--shadow);
    border-color: rgba(255, 255, 255, 0.10);
  }
}

/* ---------- 3) Specular shine buttons (adapted from SpecularButton) ---------- */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -80%;
  width: 55%;
  height: 220%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.btn:hover::before { animation: btnShine 0.85s ease; }
@keyframes btnShine {
  0%   { left: -80%;  opacity: 0; }
  12%  { opacity: 1; }
  100% { left: 135%;  opacity: 0; }
}
.btn-outline::before { background: linear-gradient(100deg, transparent 0%, rgba(184, 147, 95, 0.45) 50%, transparent 100%); }

@media (prefers-reduced-motion: reduce) {
  .btn:hover::before { animation: none; }
  .pill-link .pill-fill { transition: none; }
}
