:root {
  --bg: #f4f3ed;
  --surface: #fffcf5;
  --surface-2: #f1eee2;
  --text: #1f2f35;
  --muted: #4d6268;
  --brand: #12343b;
  --brand-2: #1f7a8c;
  --accent: #e26d2f;
  --border: rgba(18, 52, 59, 0.14);
  --shadow: 0 20px 40px rgba(18, 52, 59, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at 80% 10%,
      rgba(31, 122, 140, 0.16),
      transparent 35%
    ),
    radial-gradient(
      circle at 10% 40%,
      rgba(226, 109, 47, 0.12),
      transparent 32%
    ),
    var(--bg);
  line-height: 1.65;
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      40rem 30rem at 85% 5%,
      rgba(31, 122, 140, 0.2),
      transparent
    ),
    radial-gradient(
      35rem 25rem at 15% 20%,
      rgba(226, 109, 47, 0.15),
      transparent
    );
  animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, -2%, 0) scale(1.03);
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(244, 243, 237, 0.85);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

nav {
  margin-left: auto;
}

.brand {
  text-decoration: none;
  color: var(--brand);
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  transition: 200ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.25rem;
  cursor: pointer;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.language-select-wrap {
  position: relative;
}

.lang-select {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  border-radius: 999px;
  padding: 0.38rem 1.9rem 0.38rem 0.75rem;
  font-weight: 700;
  font-size: 0.84rem;
  min-width: 124px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.lang-select:hover {
  transform: translateY(-1px);
  background: var(--surface-2);
}

.lang-select:focus-visible {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.22);
}

.language-select-wrap::after {
  content: "";
  position: absolute;
  right: 0.72rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brand);
  margin: 5px 0;
  transition:
    transform 220ms ease,
    opacity 220ms ease;
}

.scroll-track {
  height: 3px;
  width: 100%;
  background: rgba(18, 52, 59, 0.08);
}

#scroll-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
}

.section {
  padding: 4.5rem 0;
}

.hero {
  padding-top: 5.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--brand-2);
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
}

.role-line {
  margin-top: 1rem;
  color: var(--brand);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
  cursor: pointer;
}

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

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--brand);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.hero-panel,
.project-card,
.timeline-item,
.contact-card,
.highlight-grid article,
.skill-groups div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1.2rem;
}

.hero-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

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

.hero-panel li {
  display: grid;
  gap: 0.2rem;
}

.hero-panel span {
  color: var(--muted);
  font-size: 0.88rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-2);
  font-size: 0.75rem;
  font-weight: 700;
}

.section-title {
  margin: 0.35rem 0 1.7rem;
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  padding: 1.2rem;
}

.timeline-item .time {
  color: var(--brand-2);
  font-weight: 700;
  font-size: 0.9rem;
}

.timeline-item ul {
  margin: 0.7rem 0 0;
  padding-left: 1.15rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  padding: 1.2rem;
  transition: transform 180ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card a {
  color: var(--brand-2);
  font-weight: 700;
}

.skill-groups,
.highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.skill-groups div,
.highlight-grid article,
.contact-card {
  padding: 1.2rem;
}

.skill-groups h3,
.highlight-grid h3 {
  margin-bottom: 0.5rem;
}

.contact-card {
  text-align: center;
}

.copy-note {
  min-height: 1.1rem;
  color: var(--brand-2);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0;
  background: rgba(255, 252, 245, 0.88);
}

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

.footer-wrap a {
  color: var(--brand-2);
  text-decoration: none;
  font-weight: 700;
}

.jump-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.jump-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

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

@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .project-grid,
  .skill-groups,
  .highlight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
    z-index: 5;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 4vw;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 0.8rem;
    min-width: 210px;
    display: grid;
    gap: 0.3rem;
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: 180ms ease;
  }

  .nav-links.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .section {
    padding: 3.8rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
