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

:root {
  --bg: #ffffff;
  --text: #1f1f1f;
  --text-muted: #5f5f5f;
  --text-soft: #7a7a7a;
  --border: #ededed;
  --surface: #ffffff;
  --radius-lg: 1.25rem;
  --radius-md: 0.9rem;
}

html {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-style: normal;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

.container {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
}

/* ================= HEADER ================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.primary-navigation {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ================= HAMBURGER ================= */

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 999px;
}

.menu-toggle span + span {
  margin-top: 4px;
}

/* ================= HERO ================= */

.hero-section {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 8vw, 7rem);
  background: #ffffff;
}

.hero-layout {
  width: 100%;
}

.section-kicker {
  margin-bottom: 1rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.text-display {
  max-width: 960px;
  font-size: clamp(3.25rem, 7.5vw, 6.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.055em;
  color: var(--text);
}

.sandy-title-canvas {
  display: none;
  width: 100%;
  max-width: none;
  height: clamp(280px, 34vw, 500px);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .hero-title-fallback {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .sandy-title-canvas {
    display: block;
  }
}

.intro-text {
  max-width: 680px;
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.75;
  color: var(--text-muted);
}

.hero-note {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* ================= BUTTONS ================= */

.intro-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--text);
  color: #ffffff;
  border: 1px solid var(--text);
}

.button-primary:hover {
  background: #343434;
  border-color: #343434;
}

.button-secondary {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
}

.button-secondary:hover {
  border-color: #cfcfcf;
  background: #ffffff;
}

/* ================= SECTIONS ================= */

.page-section {
  padding-block: clamp(5.5rem, 9vw, 9rem);
  background: #ffffff;
}

.page-section + .page-section {
  border-top: 1px solid var(--border);
}

.section-muted {
  background: #ffffff;
}

.section-header {
  max-width: 760px;
}

.section-header-wide {
  max-width: 880px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-header h2 {
  font-size: clamp(2.15rem, 4.8vw, 4.25rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--text);
}

.section-header p:not(.section-kicker) {
  max-width: 720px;
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.75;
  color: var(--text-muted);
}

/* ================= ABOUT ================= */

.about-grid {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
}

.about-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.about-main {
  max-width: 760px;
}

.about-content {
  margin-top: 2rem;
}

.about-content p {
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.8;
  color: var(--text-muted);
}

.about-content p + p {
  margin-top: 1.5rem;
}

/* ================= TIMELINE ================= */

.timeline {
  display: grid;
  gap: 0;
}

.timeline-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}

.timeline-card + .timeline-card {
  border-top: 1px solid var(--border);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-soft);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.timeline-body {
  max-width: 780px;
}

.timeline-body h3,
.education-card h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
}

.timeline-meta {
  margin-top: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-soft);
}

.timeline-body p:not(.timeline-meta),
.education-card p:not(.timeline-date):not(.timeline-meta) {
  max-width: 760px;
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.8;
  color: var(--text-muted);
}

.timeline-body p + p,
.education-card p + p {
  margin-top: 1rem;
}

/* ================= EDUCATION ================= */

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

.education-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}

.education-card + .education-card {
  border-top: 1px solid var(--border);
}

.education-card > div {
  max-width: 780px;
}

/* ================= PROJECTS ================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(3rem, 6vw, 5rem) 1.75rem;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-image-wrapper {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.project-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.project-content {
  padding-top: 1.25rem;
}

.project-content h3 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
}

.project-content p {
  max-width: 34rem;
  margin-top: 0.75rem;
  font-size: clamp(0.98rem, 1.1vw, 1.05rem);
  line-height: 1.7;
  color: var(--text-muted);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.project-links a {
  position: relative;
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.project-links a:hover {
  color: var(--text);
}

.project-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 100%;
  height: 1px;
  background: #d6d6d6;
  transition: background-color 0.2s ease;
}

.project-links a:hover::after {
  background: var(--text);
}

/* ================= BLOG PAGE ================= */

.blog-coming-soon {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 5rem;
  background: #ffffff;
}

.page-eyebrow {
  margin-bottom: 1rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-title {
  max-width: 850px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--text);
}

.page-description {
  max-width: 760px;
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.75;
  color: var(--text-muted);
}

.blog-placeholder-card {
  max-width: 760px;
  margin-top: 2.5rem;
}

.blog-placeholder-card h2 {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.035em;
  color: var(--text);
}

.blog-placeholder-card p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ================= SCROLL REVEAL ================= */

html.js-loading [data-animate] {
  visibility: hidden;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image-wrapper {
    max-width: 420px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .education-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 1.5rem, 1180px);
  }

  .menu-toggle {
    display: block;
  }

  .primary-navigation {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    display: none;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
  }

  .primary-navigation.is-open {
    display: block;
  }

  .nav-list {
    width: min(100% - 1.5rem, 1180px);
    margin-inline: auto;
    padding-block: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding-block: 0.75rem;
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }

  .hero-section {
    min-height: auto;
    padding-block: 5rem;
  }

  .text-display {
    line-height: 1.02;
  }

  .intro-text {
    margin-top: 1.25rem;
    line-height: 1.7;
  }

  .page-section {
    padding-block: 5rem;
  }

  .section-header h2 {
    line-height: 1.1;
  }

  .timeline-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .blog-coming-soon {
    min-height: auto;
    padding-block: 5rem;
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .project-image-wrapper {
    border-radius: var(--radius-md);
  }

  .project-content {
    padding-top: 1rem;
  }

  .project-links {
    gap: 1.25rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1rem, 1180px);
  }

  .header-container {
    min-height: 64px;
  }

  .primary-navigation {
    top: 64px;
  }

  .hero-section {
    padding-block: 4rem;
  }

  .text-display {
    font-size: clamp(2.75rem, 14vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
  }

  .section-header h2,
  .page-title {
    line-height: 1.12;
    letter-spacing: -0.035em;
  }

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

  .button {
    width: 100%;
  }

  .hero-note {
    font-size: 0.9rem;
  }

  .about-image,
  .project-image-wrapper {
    border-radius: var(--radius-md);
  }

  .timeline-card,
  .education-card {
    padding-block: 2rem;
  }

  .intro-text,
  .about-content p,
  .timeline-body p:not(.timeline-meta),
  .education-card p:not(.timeline-date):not(.timeline-meta),
  .project-content p,
  .page-description {
    line-height: 1.72;
  }

  .blog-coming-soon {
    padding-block: 4rem;
  }

  .blog-placeholder-card {
    margin-top: 2rem;
  }
}
