:root {
  --bg: #f6f8fc;
  --bg-top: #ffffff;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #1d4ed8;
  --primary-strong: #1e40af;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --max-width: 1100px;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-top: #111827;
  --surface: #111827;
  --surface-2: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --primary-strong: #93c5fd;
  --border: #334155;
  --shadow: 0 12px 30px rgba(2, 6, 23, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top, var(--bg-top) 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.6;
}

.hero > * {
  animation: fadeUp 650ms ease both;
}

.hero > *:nth-child(2) {
  animation-delay: 60ms;
}

.hero > *:nth-child(3) {
  animation-delay: 120ms;
}

.hero > *:nth-child(4) {
  animation-delay: 180ms;
}

.hero > *:nth-child(5) {
  animation-delay: 240ms;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-strong);
}

.container {
  width: min(var(--max-width), 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-weight: 700;
  color: var(--text);
}

.logo-text {
  display: inline;
}

.logo-dark-image {
  display: none;
  height: 42px;
  width: auto;
}

[data-theme="dark"] .logo-text {
  display: none;
}

[data-theme="dark"] .logo-dark-image {
  display: inline-block;
}

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

.nav-links a {
  color: var(--muted);
  font-weight: 500;
}

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

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 0.6rem;
  padding: 0.45rem 0.75rem;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 0.6rem;
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--primary);
}

.hero {
  padding: 5.5rem 0 3rem;
}

.eyebrow {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.15;
  max-width: 16ch;
}

.hero-copy {
  max-width: 62ch;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-primary:hover {
  background: var(--primary-strong);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary {
  border-color: var(--border);
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 86%, var(--bg) 14%);
}

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
}

.highlight-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.highlight {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.87rem;
  font-weight: 600;
}

.section {
  padding: 3rem 0;
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  margin: 0 0 0.8rem;
}

.section-heading p {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.timeline,
.project-grid,
.skills-grid {
  display: grid;
  gap: 1rem;
}

.project-grid,
.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 0.95rem;
  padding: 1.1rem;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

#ai .card {
  border-image: linear-gradient(120deg, var(--primary), #22d3ee) 1;
}

#ai .section-heading p {
  max-width: 72ch;
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}

.card p {
  margin: 0 0 0.6rem;
  color: var(--muted);
}

.card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.card li {
  margin-bottom: 0.34rem;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.card-top span {
  color: var(--muted);
  font-size: 0.95rem;
}

.company,
.project-role {
  font-weight: 600;
  color: var(--text);
}

.project-links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.project-links a {
  font-size: 0.92rem;
  font-weight: 600;
}

.section-subheading {
  margin-top: 1.2rem;
}

.section-subheading h3 {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}

.image-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.image-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .image-card:hover {
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.55);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

.image-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.image-card span {
  display: block;
  padding: 0.55rem 0.7rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.asset-list {
  display: grid;
  gap: 0.6rem;
}

.asset-list a {
  font-weight: 500;
}

.contact {
  text-align: center;
}

.contact p {
  color: var(--muted);
  margin: 0 auto 1.1rem;
  max-width: 56ch;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  background: var(--surface);
}

.footer-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

@media (max-width: 780px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.9rem 1rem 1rem;
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }
}
