/* ---------- Theme tokens: Garnet & Olive (light) ---------- */
:root {
  --bg: #fbf8f4;
  --bg-alt: #f2ebe0;
  --surface: #ffffff;
  --ink: #221f1c;
  --ink-muted: #7a6d5e;
  --border: #ebe1d2;
  --accent: #8c5b52;
  --accent-dark: #6e453d;
  --accent-soft: #f1e6dd;
  --accent-bistre: #4a3020;
  --accent-olive: #4b5850;
  --accent-contrast: #ffffff;

  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-disp: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;

  --shadow-sm: 0 2px 8px rgba(23, 22, 20, 0.07);
  --shadow-md: 0 12px 32px rgba(23, 22, 20, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

ul { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 244, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

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

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

.nav-logo {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-disp);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
  opacity: 1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  display: block;
  border-radius: 2px;
}

.theme-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 14px;
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
}

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

.btn-primary:hover { background: var(--accent-dark); opacity: 1; transform: translateY(-1px); }

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

.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 88px 0 48px;
  background: linear-gradient(135deg, #fbf8f4 0%, #f5ecdf 55%, #efe2cf 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.28;
}

.hero-bg .blob-1 {
  top: -18%;
  right: -8%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation: floatBlob1 16s ease-in-out infinite alternate;
}

.hero-bg .blob-2 {
  bottom: -22%;
  left: -10%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--accent-bistre) 0%, transparent 70%);
  animation: floatBlob2 20s ease-in-out infinite alternate;
}

.hero-bg .blob-3 {
  top: 30%;
  left: 40%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, var(--accent-olive) 0%, transparent 70%);
  opacity: 0.22;
  animation: floatBlob3 14s ease-in-out infinite alternate;
}

@keyframes floatBlob1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.08); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -25px) scale(1.1); }
}

@keyframes floatBlob3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, 20px) scale(0.92); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg .blob { animation: none; }
}

.hero-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-inner { max-width: none; }

.hero-photo-col { display: flex; justify-content: center; }

.hero-photo {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-md);
}

.eyebrow {
  font-family: var(--font-disp);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--font-disp);
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin-bottom: 16px;
}

.hero-tagline {
  font-family: var(--font-disp);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
}

.hero-sub {
  max-width: 560px;
  color: var(--ink-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

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

/* ---------- Sections ---------- */
.section { padding: 100px 0; }

.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 48px; }

.eyebrow-sm {
  font-family: var(--font-disp);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}

.section-title {
  font-family: var(--font-disp);
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0;
}

.section-intro {
  color: var(--ink-muted);
  margin-top: 12px;
  max-width: 640px;
  font-size: 1.02rem;
}

.about-content p {
  max-width: 720px;
  margin-bottom: 18px;
  color: var(--ink-muted);
  font-size: 1.08rem;
}

.about-content strong { color: var(--ink); font-weight: 700; }

.personal-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}

.personal-photo-col { display: flex; justify-content: center; }

.personal-photo {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-md);
}

@media (max-width: 720px) {
  .personal-row { grid-template-columns: 1fr; gap: 28px; }
  .personal-photo-col { order: -1; }
  .personal-photo { max-width: 200px; }
}

/* ---------- Skills ---------- */
.skills-group { margin-bottom: 32px; }
.skills-group:last-child { margin-bottom: 0; }

.skills-subtitle {
  font-family: var(--font-disp);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--ink);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
}

.tag-accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}

.tag-list-sm .tag {
  padding: 5px 13px;
  font-size: 0.8rem;
}

.foundation-text {
  max-width: 680px;
  color: var(--ink-muted);
  font-size: 1.02rem;
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 32px;
}

.project-tile {
  display: block;
  color: inherit;
}

.project-tile:hover { opacity: 1; }

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.project-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-alt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.project-thumb-placeholder {
  font-family: var(--font-disp);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-align: center;
  padding: 20px;
}

.project-demo-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-family: var(--font-disp);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-contrast);
  background: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

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

.project-status {
  align-self: flex-start;
  font-family: var(--font-disp);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

.project-card h3 { font-family: var(--font-disp); font-size: 1.25rem; font-weight: 700; }

.project-card p { color: var(--ink-muted); font-size: 0.96rem; }

.project-status.is-shipped {
  color: var(--surface);
  background: var(--accent);
}

.project-link {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent-dark);
  margin-top: 4px;
}

.project-link:hover { color: var(--accent); opacity: 1; }

/* ---------- Contact ---------- */
.contact-links,
.contact-links-center {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-links-center { justify-content: center; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.contact-card .section-title { margin-bottom: 14px; }

.contact-card p { color: var(--ink-muted); max-width: 480px; margin: 0 auto 32px; }

/* ---------- Resume / Timeline ---------- */
.resume-header { padding-bottom: 20px; }

.timeline-heading {
  font-family: var(--font-disp);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.timeline {
  position: relative;
  padding-left: 0;
  border-left: none;
}

.timeline-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

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

.timeline-item.expandable {
  cursor: pointer;
}

.timeline-marker { display: none; }

.timeline-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-muted);
  margin-right: 10px;
  vertical-align: middle;
  flex-shrink: 0;
}

.timeline-dot.is-current {
  background: var(--accent);
  animation: dotPulse 1.8s ease-out infinite;
}

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(140, 91, 82, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(140, 91, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(140, 91, 82, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-dot.is-current { animation: none; }
}

.timeline-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-title { font-family: var(--font-disp); font-size: 1.05rem; font-weight: 700; }

.timeline-org { font-weight: 500; color: var(--ink-muted); }

.timeline-dates {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 600;
  white-space: nowrap;
}

.timeline-desc { color: var(--ink-muted); max-width: 640px; margin-top: 8px; }

.timeline-toggle {
  font-family: var(--font-disp);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-top: 10px;
  display: inline-block;
}

.timeline-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: none;
}

.timeline-item.open .timeline-details { display: block; }

.timeline-details ul { list-style: disc; padding-left: 20px; }
.timeline-details li { color: var(--ink-muted); margin-bottom: 6px; font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    gap: 8px;
    display: none;
  }

  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }

  .hero { min-height: auto; padding: 100px 0 60px; }

  .hero-row { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo-col { order: -1; }
  .hero-photo { max-width: 220px; }

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

  .section { padding: 64px 0; }

  .timeline-row { flex-direction: column; gap: 4px; }

  .contact-card { padding: 36px 24px; }
}
