:root {
  --bg: #f4f1ea;
  --surface: #fbfaf7;
  --surface-2: #eee8dd;
  --ink: #1f211c;
  --muted: #666a60;
  --faint: #8c8a80;
  --line: #d9d1c2;
  --accent: #36543f;
  --accent-2: #9a6b3d;
  --accent-soft: #e5ece1;
  --warning-bg: #fff7ed;
  --warning-border: #b86b1d;
  --max: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Aptos", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  opacity: 0.78;
}

.container {
  width: min(90%, var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 241, 234, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--ink);
  opacity: 1;
}

.hero {
  padding: 56px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
  align-items: start;
}

.hero-main,
.hero-side,
.card,
.project-card,
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.hero-main {
  padding: 34px;
}

.hero-side {
  align-self: start;
  padding: 22px;
}

.eyebrow {
  display: none;
}

h1,
.section-title,
.project-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
  color: var(--ink);
}

h1 {
  max-width: 780px;
  font-size: clamp(2.4rem, 4.8vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  margin-bottom: 18px;
}

.subtitle {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.02rem;
}

.actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--surface);
  opacity: 1;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--surface);
}

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

.meta-grid {
  display: grid;
  gap: 0;
}

.meta-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.meta-item:first-child {
  padding-top: 0;
}

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

.meta-label {
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section {
  padding: 40px 0;
}

.section-header {
  margin-bottom: 22px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  margin-bottom: 14px;
}

.section-copy {
  max-width: 850px;
  color: var(--muted);
  margin-bottom: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

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

.card {
  padding: 26px;
}

.card h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.05rem;
}

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

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.55);
}

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

.timeline h3 {
  font-size: 1.05rem;
  margin-bottom: 3px;
}

.org {
  color: var(--accent);
  font-weight: 700;
}

.date {
  color: var(--faint);
  font-size: 0.92rem;
}

ul {
  color: var(--muted);
  padding-left: 20px;
}

li + li {
  margin-top: 7px;
}

.contact-list,
.source-list {
  display: grid;
  gap: 12px;
}

.contact-card {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-card .contact-list {
  justify-items: center;
  font-size: 1.05rem;
}

.contact-card .actions {
  justify-content: center;
}

.project-card {
  margin-bottom: 26px;
  overflow: hidden;
}

.project-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.project-media img {
  width: 100%;
  height: 340px;
  object-fit: contain;
  background: var(--surface-2);
  padding: 16px;
}

.project-media img + img {
  border-left: 1px solid var(--line);
}

.single-project-image,
.formula-image {
  width: 88%;
  max-height: 420px;
  margin: 24px auto 0;
  object-fit: contain;
  border-radius: 14px;
  background: transparent;
}

.formula-image {
  width: 64%;
  transition: transform 0.18s ease;
}

.formula-image:hover {
  transform: scale(1.01);
}

.project-content {
  padding: 28px;
}

.project-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.05;
  margin-bottom: 8px;
}

.project-subtitle {
  color: var(--accent-2);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.project-subsection {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.project-subsection-title {
  font-size: 1.35rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.notice {
  padding: 22px 24px;
  background: var(--warning-bg);
  border-left: 6px solid var(--warning-border);
}

.notice strong {
  color: #7c4215;
}

.footer {
  margin-top: 42px;
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 900px) {
  .hero-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 42px 0 28px;
  }

  .hero-main,
  .hero-side,
  .card,
  .project-content {
    padding: 24px;
  }

  h1 {
    font-size: clamp(2.35rem, 10vw, 3.6rem);
    line-height: 1;
  }

  .project-media {
    grid-template-columns: 1fr;
  }

  .project-media img + img {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-links {
    gap: 14px;
  }

  .actions,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.15rem, 12vw, 3.15rem);
  }

  .subtitle {
    font-size: 0.98rem;
  }
}
/* ================================
   NAV RESUME BUTTON + CONTACT WIDTH
================================ */

/* Make the Resume nav item more visible */
.nav-links .nav-resume {
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(154, 107, 61, 0.08);
}

.nav-links .nav-resume:hover {
  color: var(--surface);
  background: var(--accent-2);
  opacity: 1;
}

/* Make the contact card the same width as other home sections */
.contact-card {
  max-width: none;
  width: 100%;
  margin: 0;
  text-align: center;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-card .contact-list {
  justify-items: center;
  font-size: 1.05rem;
}

.contact-card .actions {
  justify-content: center;
}
/* ================================
   NAVBAR ALIGNMENT FIX
   Centers all nav links vertically with name and resume button
================================ */

.nav {
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  line-height: 1;
}

/* Keep Resume as the right-most, more visible option */
.nav-links a.resume-link {
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(154, 107, 61, 0.08);
}

.nav-links a.resume-link:hover {
  background: var(--accent-2);
  color: var(--surface);
  opacity: 1;
}

/* Mobile navbar cleanup */
@media (max-width: 640px) {
  .nav-links {
    align-items: flex-start;
  }

  .nav-links a {
    min-height: auto;
  }

  .nav-links a.resume-link {
    padding: 8px 14px;
  }
}
/* Make only the homepage hero headline smaller */
.home-hero-title {
  font-size: clamp(2.15rem, 4vw, 3.65rem);
  line-height: 1.05;
  max-width: 900px;
}

@media (max-width: 900px) {
  .home-hero-title {
    font-size: clamp(2rem, 8vw, 3.1rem);
  }
}
