:root {
  --bg: #f4f0e8;
  --bg-deep: #151512;
  --panel: rgba(255, 250, 239, 0.66);
  --panel-strong: rgba(255, 248, 234, 0.82);
  --text: #171411;
  --muted: #64594b;
  --line: rgba(23, 20, 17, 0.08);
  --accent: #e85b2d;
  --accent-soft: #ffbd66;
  --accent-cold: #95d8d1;
  --shadow: 0 18px 60px rgba(41, 31, 22, 0.14);
  --radius: 28px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 189, 102, 0.32), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(149, 216, 209, 0.26), transparent 24%),
    linear-gradient(180deg, #f9f4ea 0%, #efe5d6 42%, #ece4db 100%);
  overflow-x: hidden;
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
}

.ambient,
.ambient-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.ambient-a {
  background: radial-gradient(circle at 15% 15%, rgba(232, 91, 45, 0.18), transparent 26%);
  animation: drift 14s ease-in-out infinite alternate;
}

.ambient-b {
  background: radial-gradient(circle at 80% 30%, rgba(149, 216, 209, 0.18), transparent 28%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

.ambient-grid {
  background-image:
    linear-gradient(rgba(23, 20, 17, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 20, 17, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 88%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 20px;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(23, 20, 17, 0.14);
  border-radius: 50%;
  background: rgba(255, 248, 234, 0.7);
  font-family: "Syne", sans-serif;
  font-weight: 800;
}

.topnav {
  display: flex;
  gap: 22px;
  padding: 14px 18px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 250, 239, 0.65);
  box-shadow: var(--shadow);
}

.topnav a,
.topbar-mail {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-menu {
  position: relative;
}

.contact-menu summary {
  list-style: none;
  cursor: pointer;
}

.contact-menu summary::-webkit-details-marker {
  display: none;
}

.topbar-mail {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  background: rgba(255, 250, 239, 0.65);
}

.contact-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 280px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  background: rgba(255, 248, 236, 0.96);
  box-shadow: var(--shadow);
}

.contact-dropdown a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-dropdown a:hover {
  background: rgba(23, 20, 17, 0.05);
  color: var(--text);
}

main,
.footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  position: relative;
  padding: 64px 0;
}

.section:not(.hero)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(23, 20, 17, 0.14), transparent);
}

.hero {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  align-items: center;
  gap: 72px;
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.94rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1,
.section-heading h2,
.split-panel h2,
.cv-card h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(3.05rem, 5.3vw, 5.4rem);
  max-width: 14ch;
  text-wrap: balance;
}

.hero h1 span {
  display: block;
  color: var(--accent);
}

.hero-text {
  max-width: 44rem;
  margin: 20px 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: var(--text);
  color: #fffaf0;
}

.button-secondary {
  background: rgba(255, 250, 239, 0.78);
  border: 1px solid rgba(23, 20, 17, 0.08);
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.status-card,
.project-card,
.split-panel,
.cv-card,
.intro-strip,
.topnav,
.topbar-mail {
  box-shadow: var(--shadow);
}

.status-card,
.project-card,
.split-panel,
.cv-card {
  border: 1px solid rgba(23, 20, 17, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.status-card {
  padding: 24px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.status-visual {
  width: 100%;
  height: 190px;
  margin-bottom: 16px;
  border-radius: 22px;
  overflow: hidden;
}

.status-visual img,
.project-media img,
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.status-label {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
}

.status-card h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.02;
}

.status-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.96rem;
}

.contact-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  border-radius: 22px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.96rem;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 248, 234, 0.65);
  margin-top: 8px;
}

.intro-metric {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
}

.metric-value {
  display: block;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.94rem;
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 8px;
}

.section-heading-tight {
  margin-bottom: 16px;
  padding-bottom: 0;
}

.section-heading h2,
.split-panel h2,
.cv-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  max-width: 19ch;
  line-height: 1;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.project-card {
  grid-column: span 4;
  padding: 22px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.project-card.feature {
  grid-column: span 8;
  min-height: 0;
  background:
    linear-gradient(160deg, rgba(255, 248, 234, 0.84), rgba(255, 226, 191, 0.55)),
    var(--panel);
}

.project-card-campusride {
  grid-column: 3 / span 8;
  grid-row: 1;
}

.project-card-row-two {
  grid-row: 2;
}

.project-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.project-header h3,
.timeline-content h3,
.education-list h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.45rem;
  line-height: 1.05;
}

.project-description,
.timeline-content p,
.education-list p,
.cv-card p {
  color: var(--muted);
  line-height: 1.62;
  font-size: 0.97rem;
  max-width: 62ch;
}

.project-media {
  width: 100%;
  height: 190px;
  margin: 14px 0 10px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(23, 20, 17, 0.08);
}

.project-gallery {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 10px;
  height: 210px;
  margin: 14px 0 12px;
}

.project-gallery-compact {
  grid-template-columns: 1fr 1fr;
  height: 100%;
  margin: 0;
}

.gallery-thumb,
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  border-radius: 18px;
  border: 1px solid rgba(23, 20, 17, 0.1);
  box-shadow: 0 12px 30px rgba(41, 31, 22, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-thumb:hover,
.project-media img:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(41, 31, 22, 0.22);
}

.gallery-thumb-large {
  grid-row: 1 / span 2;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.chip-row span,
.skills-cloud span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 0.86rem;
}

.asset-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.asset-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(23, 20, 17, 0.18);
  background: rgba(255, 255, 255, 0.32);
}

.asset-slot span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.asset-slot a {
  font-weight: 700;
  color: var(--text);
}

.report-preview {
  display: grid;
  gap: 10px;
}

.report-preview iframe {
  width: 100%;
  height: 180px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.report-preview a {
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
}

.lightbox.is-open {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.56);
  backdrop-filter: blur(10px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 54px 22px 22px;
  overflow: auto;
  border-radius: 28px;
  background: rgba(255, 248, 236, 0.9);
  border: 1px solid rgba(23, 20, 17, 0.08);
  box-shadow: 0 24px 80px rgba(24, 19, 14, 0.28);
}

.lightbox-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 20, 17, 0.92);
  color: #fffaf0;
  font: inherit;
  cursor: pointer;
}

.lightbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.lightbox-grid img {
  width: 100%;
  display: block;
  border-radius: 20px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  box-shadow: var(--shadow);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 168px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(23, 20, 17, 0.12);
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: start;
}

.timeline-meta {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  padding-top: 12px;
}

.timeline-content {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  border-radius: 22px;
  background: rgba(255, 250, 239, 0.62);
}

.timeline-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: start;
}

.timeline-copy {
  min-width: 0;
}

.timeline-media {
  display: grid;
  gap: 10px;
  justify-self: end;
}

.timeline-media-side {
  grid-template-columns: repeat(2, 1fr);
  width: 138px;
  gap: 8px;
}

.timeline-media img {
  width: 150px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(23, 20, 17, 0.08);
  box-shadow: 0 12px 26px rgba(41, 31, 22, 0.12);
  cursor: pointer;
}

.timeline-media-side img {
  width: 65px;
  height: 126px;
}

.timeline-content::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 28px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(232, 91, 45, 0.14);
}

.split-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.split-panel {
  padding: 24px;
}

.education-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.education-list article {
  padding: 20px 0;
  border-top: 1px solid rgba(23, 20, 17, 0.08);
}

.education-list article h3 {
  margin: 6px 0 10px;
}

.education-list article p {
  margin: 0 0 8px;
  max-width: none;
  width: 100%;
}

.edu-date {
  display: inline-block;
  margin-bottom: 0;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.certifications-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.certifications-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.cv-card {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 8px;
  padding-bottom: 32px;
  border-top: 1px solid rgba(23, 20, 17, 0.1);
}

.footer-left,
.footer-right {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-left p,
.footer-left a,
.footer-right a {
  margin: 0;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tilt-card {
  transform-style: preserve-3d;
  transition: transform 220ms ease;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, 20px, 0) scale(1.08);
  }
}

@media (max-width: 1080px) {
  .hero,
  .split-section,
  .cv-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 30px;
  }

  .project-card,
  .project-card.feature,
  .project-card-campusride,
  .project-card-row-two {
    grid-column: span 12;
    grid-row: auto;
  }

  .intro-strip {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 820px) {
  .topbar {
    padding: 14px 14px;
  }

  .topnav {
    display: none;
  }

  .topbar-mail {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .section {
    padding: 42px 0;
  }

  .hero {
    gap: 24px;
    padding-top: 18px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.6rem);
    max-width: 10ch;
    text-wrap: initial;
  }

  .hero-text {
    font-size: 0.96rem;
  }

  .status-visual,
  .project-media {
    height: 180px;
  }

  .project-gallery {
    grid-template-columns: 1fr 1fr;
    height: auto;
  }

  .gallery-thumb,
  .project-media img {
    min-height: 150px;
  }

  .gallery-thumb-large {
    grid-row: auto;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .timeline-media {
    justify-self: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .timeline-media img {
    width: 100%;
    height: 140px;
  }

  .timeline-content::before {
    display: none;
  }

  .timeline-meta {
    padding-top: 0;
  }

  .asset-row {
    grid-template-columns: 1fr;
  }

  .intro-strip,
  .project-card,
  .split-panel,
  .timeline-content,
  .cv-card,
  .status-card {
    border-radius: 22px;
  }

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

  .lightbox-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    margin: 10px auto;
    padding: 52px 14px 14px;
  }

  .lightbox-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  main,
  .footer {
    padding: 0 14px;
  }
}
