/* ── Reset & base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sky:      #c47a2a;
  --sky-dark: #a35e1a;
  --cream:    #1a1917;
  --text:     #e8e4de;
  --muted:    #a89f94;
  --white:    #ffffff;
  --surface:  #252320;
  --border:   #3a3530;
}

html {
  scroll-behavior: smooth;
  font-size: clamp(14px, 1.5vw, 18px);
}

body {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
  height: clamp(52px, 8vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--sky-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(16px, 3vw, 36px);
}

.nav-links a {
  text-decoration: none;
  font-size: clamp(0.7rem, 1.2vw, 0.875rem);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--sky-dark);
}

/* ── Mobile menu ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.nav-toggle:hover {
  color: var(--sky);
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px clamp(16px, 4vw, 48px) 20px;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }
}

/* ── Intro: photo + text side by side ── */
.intro {
  display: flex;
  align-items: stretch;
  max-width: 75rem;
  margin: clamp(24px, 5vw, 64px) auto;
  padding: 0 clamp(16px, 4vw, 48px);
  gap: clamp(24px, 4vw, 56px);
}

.intro-photo {
  flex: 1 1 45%;
  min-height: clamp(240px, 40vw, 520px);
  border-radius: 8px;
  overflow: hidden;
  background: var(--sky);
}

.intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: clamp(240px, 40vw, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  color: var(--white);
  background: linear-gradient(160deg, var(--sky) 0%, var(--sky-dark) 100%);
}

.intro-text {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px) 0;
}

/* ── Section eyebrow ── */
.section-eyebrow {
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sky-dark);
  margin-bottom: 0.75em;
}

.intro-text h1 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6em;
  line-height: 1.2;
}

.welcome-text {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
}

.hero-cta {
  display: flex;
  gap: clamp(10px, 2vw, 16px);
  margin-top: 1.5em;
  flex-wrap: wrap;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--sky);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
  letter-spacing: 0.03em;
  padding: 0.75em 1.5em;
  border-radius: 6px;
  border: 2px solid var(--sky);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-outline:hover {
  background: var(--sky);
  color: var(--white);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .hero-cta {
    justify-content: center;
  }
}

/* ── Stack on narrow screens ── */
@media (max-width: 640px) {
  .intro {
    flex-direction: column;
  }

  .intro-photo {
    min-height: clamp(200px, 60vw, 320px);
    flex: none;
  }

  .photo-placeholder {
    min-height: clamp(200px, 60vw, 320px);
  }

  .intro-text {
    text-align: center;
  }
}

/* ── Gallery ── */
.gallery {
  width: 100%;
}

.gallery-grid {
  display: flex;
  height: clamp(180px, 30vw, 420px);
}

.gallery-item {
  flex: 1;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.03);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  color: var(--white);
  font-weight: 500;
}

.gallery-item:nth-child(1) .gallery-placeholder { background: #5c4a35; }
.gallery-item:nth-child(2) .gallery-placeholder { background: #4a3828; }
.gallery-item:nth-child(3) .gallery-placeholder { background: #3a2a1c; }

@media (max-width: 640px) {
  .gallery-grid {
    flex-direction: column;
    height: auto;
  }

  .gallery-item {
    height: clamp(180px, 60vw, 300px);
  }
}

/* ── Tech Stack ── */
.tech-stack {
  max-width: 75rem;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) clamp(16px, 4vw, 48px);
  text-align: center;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 14px);
  margin-top: 1.25em;
}

.tech-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
  font-weight: 500;
  padding: 0.5em 1.2em;
  border-radius: 30px;
  transition: border-color 0.2s, color 0.2s;
}

.tech-tag:hover {
  border-color: var(--sky);
  color: var(--sky);
}

/* ── Connect ── */
.connect {
  background: var(--surface);
  padding: clamp(36px, 6vw, 64px) clamp(16px, 4vw, 48px);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 20px);
  margin-top: 1.25em;
}

.social-links a {
  width: clamp(40px, 5vw, 52px);
  height: clamp(40px, 5vw, 52px);
  border-radius: 50%;
  background: var(--sky);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.social-links a:hover {
  background: var(--sky-dark);
  transform: translateY(-2px);
}

/* ── Footer ── */
a:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

footer {
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  padding: clamp(28px, 5vw, 48px) clamp(16px, 4vw, 48px);
  font-size: clamp(0.7rem, 1.1vw, 0.85rem);
  letter-spacing: 0.03em;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 16px);
  margin-bottom: 1em;
}

.footer-social a {
  width: clamp(30px, 4vw, 40px);
  height: clamp(30px, 4vw, 40px);
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.footer-social a:hover {
  border-color: var(--sky);
  color: var(--sky);
}

/* ── Nav active state ── */
.nav-active {
  color: var(--sky-dark) !important;
}

/* ── Page header ── */
.page-header {
  background: var(--sky-dark);
  padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 48px);
  text-align: center;
}

.page-header h1 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}

/* ── About wrapper ── */
.about-wrapper {
  max-width: 75rem;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 48px);
}

.about-summary {
  text-align: center;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--muted);
  margin-bottom: clamp(28px, 4vw, 48px);
  line-height: 1.8;
}

/* ── Family photo ── */
.about-photo {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.about-photo img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  display: block;
}

.photo-caption {
  text-align: center;
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
  color: var(--muted);
  margin-top: 10px;
  font-style: italic;
}

/* ── Bio sections ── */
.about-sections {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
}

.about-section {
  border-left: 3px solid var(--sky);
  padding-left: clamp(16px, 2.5vw, 28px);
}

.about-section h3 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 600;
  color: var(--sky-dark);
  margin-bottom: 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-section p {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
  margin-bottom: 0.75em;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.about-section a {
  color: var(--sky-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-section a:hover {
  color: var(--text);
}

/* ── Traits list ── */
.traits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.traits-list li {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
}

.trait-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 8px;
}
/* ── Resume page ── */
.resume-wrapper {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 48px);
}

.resume-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.resume-note {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  background: var(--sky);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
  letter-spacing: 0.03em;
  padding: 0.75em 1.5em;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
}

.btn-download:hover {
  background: var(--sky-dark);
  transform: translateY(-2px);
}

.resume-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}

.resume-page {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.resume-loading {
  text-align: center;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
  padding: clamp(48px, 8vw, 96px) 0;
}

.resume-fallback {
  text-align: center;
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
  color: var(--muted);
  margin-top: 14px;
  font-style: italic;
}

.resume-fallback a {
  color: var(--sky-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resume-fallback a:hover {
  color: var(--text);
}

/* ── Portfolio page ── */
.portfolio-wrapper {
  max-width: 75rem;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 48px);
}

.portfolio-intro {
  text-align: center;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
  margin-bottom: clamp(28px, 4vw, 48px);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--sky);
}

.project-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sky);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.04);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--white);
  background: linear-gradient(160deg, var(--sky) 0%, var(--sky-dark) 100%);
}

.project-body {
  padding: clamp(18px, 2.5vw, 26px);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-body h3 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4em;
}

.project-body h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.project-body h3 a:hover {
  color: var(--sky);
}

.project-desc {
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  color: var(--muted);
  margin-bottom: 1.25em;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1em;
}

.project-tags .tech-tag {
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  padding: 0.3em 0.9em;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  color: var(--sky-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.project-link:hover {
  color: var(--sky);
  border-color: var(--sky);
}

.project-link i {
  font-size: 0.85em;
}

/* ── Links page ── */
.links-wrapper {
  max-width: 56rem;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 48px);
}

.links-intro {
  text-align: center;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
  margin-bottom: clamp(28px, 4vw, 48px);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.link-card {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(16px, 2.5vw, 24px);
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}

.link-card:hover {
  transform: translateY(-3px);
  border-color: var(--sky);
}

.link-icon {
  flex-shrink: 0;
  width: clamp(44px, 6vw, 56px);
  height: clamp(44px, 6vw, 56px);
  border-radius: 50%;
  background: var(--sky);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  transition: background 0.2s;
}

.link-card:hover .link-icon {
  background: var(--sky-dark);
}

.link-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.link-title {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.link-label {
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
  color: var(--muted);
}

.link-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
  transition: color 0.2s, transform 0.2s;
}

.link-card:hover .link-arrow {
  color: var(--sky);
  transform: translateX(4px);
}