:root {
  --bg: #f4f8f7;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --text: #102422;
  --muted: #4f6562;
  --line: rgba(16, 36, 34, 0.12);
  --primary: #0f766e;
  --primary-strong: #0b5d57;
  --accent: #f97316;
  --radius: 16px;
  --shadow: 0 14px 40px rgba(16, 36, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at 20% 20%, #d9efe9, var(--bg) 35%),
    radial-gradient(circle at 80% 10%, #ffe9d4, transparent 40%), var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
  position: relative;
  z-index: 2;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite alternate;
}

.orb-a {
  width: 360px;
  height: 360px;
  top: -80px;
  left: -40px;
  background: #34d399;
}

.orb-b {
  width: 300px;
  height: 300px;
  top: 25%;
  right: -80px;
  background: #fb923c;
  animation-delay: 2s;
}

.orb-c {
  width: 220px;
  height: 220px;
  bottom: 6%;
  left: 50%;
  background: #2dd4bf;
  animation-delay: 4s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 248, 247, 0.72);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: var(--text);
  color: #e8fff7;
}

.main-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.main-nav a {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  transition: color 180ms ease, background-color 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  background: rgba(16, 36, 34, 0.08);
  outline: none;
}

.button-link {
  border: 1px solid var(--line);
}

.hero {
  padding-top: 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  color: var(--primary-strong);
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 0.95;
  margin-bottom: 1.2rem;
}

.lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.76rem 1.1rem;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease,
    background-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #f4fffd;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.24);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
}

.hero-card,
.skills-panel,
.project-card,
.timeline-content {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.4rem;
  align-self: center;
}

.hero-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.hero-card li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.5rem;
}

.hero-card li span {
  color: var(--muted);
}

.section-head {
  margin-bottom: 1.8rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.timeline {
  position: relative;
  margin-bottom: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--primary), transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  margin-top: 10px;
  background: var(--primary);
  border: 4px solid #daf7f2;
}

.timeline-content {
  padding: 1rem 1.1rem;
}

.company-box {
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}

.company-box:hover,
.company-box:focus-visible {
  border-color: var(--primary);
  transform: translateY(-1px);
  outline: none;
}

.company-box.is-open {
  border-color: var(--primary);
}

.company-project {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
}

.company-project h4 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--primary-strong);
  margin-bottom: 0.5rem;
}

.timeline-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.skills-panel {
  padding: 1rem;
}

.skills-panel h3 {
  margin-bottom: 0.8rem;
}

.competency-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.65rem;
}

.competency-list li {
  line-height: 1.5;
  color: var(--text);
}

#interest {
  position: relative;
  overflow: hidden;
}

#interest .container {
  position: relative;
  z-index: 2;
}

.section-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.section-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(233, 246, 242, 0.8) 0%,
    rgba(233, 246, 242, 0.7) 55%,
    rgba(233, 246, 242, 0.82) 100%
  );
}

#interest .skills-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(174, 203, 195, 0.7);
  backdrop-filter: blur(2px);
}

.interest-detail {
  margin-top: 0.8rem;
}

.interest-point {
  margin-top: 0;
}

.interest-point h3 {
  margin-bottom: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip-list span {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.36rem 0.68rem;
  font-size: 0.92rem;
}

.project-highlights {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}

.project-highlights > li > ul {
  margin-top: 0.4rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-wrap {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.contact-links {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  width: fit-content;
}

.contact-icon {
  width: 18px;
  height: 18px;
  color: var(--primary-strong);
}

.doc-figure {
  margin-top: 1rem;
}

.doc-image {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.doc-figure figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drift {
  from {
    transform: translateY(0px) translateX(0px) scale(1);
  }
  to {
    transform: translateY(22px) translateX(18px) scale(1.08);
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .project-grid,
  .footer-wrap {
    grid-template-columns: 1fr;
    display: grid;
  }

  .footer-wrap {
    align-items: start;
  }

  .main-nav {
    gap: 0.2rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .section {
    padding: 4rem 0;
  }

  .hero {
    padding-top: 4.4rem;
  }

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

  .main-nav a {
    padding: 0.45rem 0.7rem;
    font-size: 0.93rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
