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

body {
  background-color: #f5f0e8;
  min-height: 100vh;
  font-family: 'Georgia', serif;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 28px 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid #d6cec3;
  background-color: #f5f0e8;
}

.header-nav {
  grid-column: 2;
  display: flex;
  gap: 44px;
  align-items: center;
}

.header-nav a {
  position: relative;
  color: #3a3228;
  text-decoration: none;
  font-family: 'Georgia', serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #7a5c3a;
  transition: width 0.25s ease;
}

.header-nav a:hover {
  color: #7a5c3a;
}

.header-nav a:hover::after {
  width: 100%;
}

.header-icons {
  grid-column: 3;
  justify-self: end;
}

.header-icons {
  display: flex;
  gap: 28px;
  align-items: center;
}

.header-icons a {
  color: #3a3228;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.header-icons a:hover {
  color: #9a7f5a;
  transform: translateY(-2px);
}

.header-icons svg {
  width: 32px;
  height: 32px;
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.sections-timeline {
  position: relative;
}

.sections-timeline::before {
  content: '';
  position: absolute;
  left: 64px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d0c8be;
}

.page-section {
  padding: 60px 80px 100px;
  scroll-margin-top: 85px;
}

#education {
  padding-top: 60px;
}

#experience {
  padding-top: 140px;
}

#projects {
  padding-top: 160px;
  padding-bottom: 260px;
}

.page-section h2 {
  position: relative;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 400;
  font-style: italic;
  color: #2a2018;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
  padding-left: 16px;
}

.page-section h2::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 1px;
  background: #d0c8be;
}

.page-section h2::after {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0b4a8;
}

/* ── Education ────────────────────────────────────────────────────────── */
.edu-entry {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 36px 44px;
  background: rgba(210, 200, 185, 0.28);
  border-radius: 20px;
}

.edu-degree {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 400;
  color: #2a2018;
  letter-spacing: -0.02em;
}

.edu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edu-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.edu-major {
  font-size: 1rem;
  color: #5a4a3a;
}

.edu-major em {
  font-style: italic;
  color: #7a5c3a;
}

.edu-school {
  font-size: 0.9rem;
  color: #9a8a7a;
}

.edu-duration {
  font-size: 0.9rem;
  color: #9a8a7a;
  font-style: italic;
  letter-spacing: 0.02em;
}

/* ── Projects ─────────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  background: rgba(210, 200, 185, 0.28);
  border-radius: 20px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 400;
  color: #2a2018;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.project-link {
  flex-shrink: 0;
  color: #9a8a7a;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
}

.project-link svg {
  width: 20px;
  height: 20px;
}

.project-link:hover {
  color: #3a2a18;
  transform: translateY(-2px);
}

.project-graphic {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.project-graphic svg {
  width: 100%;
  max-width: 150px;
  color: #a89878;
  opacity: 0.45;
}

.project-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-desc {
  font-size: 0.9rem;
  color: #5a4a3a;
  line-height: 1.6;
  margin-top: 10px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: auto;
  padding-top: 16px;
}

.project-tags span {
  font-size: 0.82rem;
  color: #9a8a7a;
  font-family: 'Georgia', serif;
  font-style: italic;
}

.project-tags span::after {
  content: ' · ';
  color: #c0b4a8;
  letter-spacing: 0.15em;
  margin: 0 4px;
}

.project-tags span:last-child::after {
  content: '';
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border: 1px solid #c8bfb4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a8a7a;
  text-decoration: none;
  animation: nudge 2.4s ease-in-out infinite;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.scroll-hint svg {
  width: 16px;
  height: 16px;
}

.scroll-hint:hover {
  border-color: #7a5c3a;
  color: #7a5c3a;
}

@keyframes nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(5px); }
}

/* ── Experience ───────────────────────────────────────────────────────── */
.exp-container {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.exp-sidebar {
  flex-shrink: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-tab {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: none;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.exp-tab:hover {
  border-color: #c8bfb4;
}

.exp-tab.is-active {
  border-color: #c8bfb4;
  background: rgba(200, 191, 180, 0.12);
}

.exp-tab-role {
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #2a2018;
}

.exp-tab-company {
  font-family: 'Georgia', serif;
  font-size: 0.82rem;
  color: #9a8a7a;
  font-style: italic;
}

.exp-panels {
  flex: 1;
}

.exp-panel {
  display: none;
  background: rgba(210, 200, 185, 0.28);
  border-radius: 20px;
  padding: 36px 44px;
}

.exp-panel.is-active {
  display: block;
}

.exp-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.exp-panel-role {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 400;
  color: #2a2018;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.exp-panel-company {
  font-size: 0.9rem;
  color: #9a8a7a;
  font-style: italic;
}

.exp-panel-date {
  font-family: 'Georgia', serif;
  font-size: 0.88rem;
  color: #9a8a7a;
  font-style: italic;
  flex-shrink: 0;
  margin-left: 24px;
}

.exp-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid #e4ddd5;
  padding-top: 24px;
}

.exp-points li {
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  color: #5a4a3a;
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
}

.exp-points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #b8a898;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 80px;
  border-top: 1px solid #d6cec3;
  font-family: 'Georgia', serif;
  font-size: 0.82rem;
  font-style: italic;
  color: #9a8a7a;
}

.site-footer a {
  color: #7a5c3a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #3a2a18;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 48px;
  padding: 40px 80px 60px;
  min-height: calc(100vh - 85px);
  scroll-margin-top: 85px;
}

/* canvas on the left */
.hero-canvas {
  flex-shrink: 0;
}

canvas {
  display: block;
  cursor: none;
}

/* right side: title + description stacked */
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero-text h1 {
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 400;
  color: #2a2018;
  line-height: 1.05;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hero-text h1 em {
  font-style: italic;
  color: #7a5c3a;
}

.cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background-color: #7a5c3a;
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-about {
  max-width: 600px;
}

.hero-about p {
  font-size: 1.15rem;
  color: #5a4a3a;
  line-height: 1.75;
  font-family: 'Georgia', serif;
}

.hero-about p em {
  font-style: italic;
  color: #7a5c3a;
}

.say-hi-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid #b8a898;
  border-radius: 100px;
  color: #3a2a18;
  text-decoration: none;
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.say-hi-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.say-hi-btn:hover {
  background: rgba(122, 92, 58, 0.08);
  border-color: #7a5c3a;
  color: #7a5c3a;
}
/* ── Responsive ────────────────────────────────────────────────────────── */

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

  .hero {
    gap: 32px;
    padding: 32px 48px 60px;
  }

  .page-section {
    padding: 60px 48px 80px;
  }

  .sections-timeline::before {
    left: 32px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 18px 24px;
    grid-template-columns: 1fr auto;
  }

  .header-nav {
    grid-column: 1;
    gap: 20px;
  }

  .header-nav a {
    font-size: 0.88rem;
    letter-spacing: 0.01em;
  }

  .header-icons {
    grid-column: 2;
  }

  .header-icons svg {
    width: 24px;
    height: 24px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px 60px;
    gap: 28px;
    min-height: auto;
  }

  .hero-canvas {
    width: 100%;
  }

  canvas {
    width: 100% !important;
    height: auto !important;
  }

  .page-section {
    padding: 48px 24px 60px;
  }

  .sections-timeline::before {
    left: 16px;
  }

  #education  { padding-top: 40px; }
  #experience { padding-top: 80px; }
  #projects   { padding-top: 80px; padding-bottom: 100px; }

  .edu-entry {
    padding: 24px 20px;
  }

  .exp-container {
    flex-direction: column;
    gap: 16px;
  }

  .exp-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }

  .exp-tab {
    flex-shrink: 0;
    width: auto;
    padding: 10px 14px;
  }

  .exp-panel {
    padding: 24px 20px;
  }

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

  .site-footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .header-nav {
    gap: 12px;
  }

  .header-nav a {
    font-size: 0.8rem;
  }

  .page-section h2 {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }

  .hero-text h1 {
    font-size: clamp(2rem, 8vw, 3rem);
    white-space: normal;
  }
}
