:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --fg: #1f2430;
  --muted: #6b7280;
  --accent: #0f6ab0;
  --accent-soft: #e2f1ff;
  --card-bg: #ffffff;
  --card-border: rgba(15, 106, 176, 0.12);
  --shadow: 0 16px 40px rgba(15, 39, 85, 0.08);
  --radius: 18px;
  font-size: 16px;
}

body.dark {
  color-scheme: dark;
  --bg: #0b1220;
  --fg: #e4ecff;
  --muted: #a3b3d8;
  --accent: #66c2ff;
  --accent-soft: rgba(102, 194, 255, 0.12);
  --card-bg: #151f33;
  --card-border: rgba(102, 194, 255, 0.2);
  --shadow: 0 20px 45px rgba(2, 6, 23, 0.6);
}

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

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 40%, #f0f4fb 100%);
  line-height: 1.7;
}

body.dark {
  background: radial-gradient(circle at top, rgba(102, 194, 255, 0.2), transparent 55%), #050914;
}

.noscript-notice {
  margin: 0;
  padding: 1rem;
  text-align: center;
  background: #fdf4d0;
  color: #4b3200;
  font-weight: 600;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  padding: 1.5rem clamp(4vw, 4.5rem, 10vw) 3rem;
  align-items: center;
  background: radial-gradient(circle at top left, rgba(15, 106, 176, 0.12), transparent 55%);
}

.hero-media {
  justify-self: center;
  position: relative;
}

.hero-photo {
  width: min(320px, 90vw);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 28px 55px rgba(15, 39, 85, 0.22);
  border: 6px solid rgba(255, 255, 255, 0.85);
  background: #ffffff;
}

.hero-content {
  display: grid;
  gap: 1rem;
}

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

.hero-topline .mode-toggle {
  margin-left: auto;
}

.hero-eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  line-height: 1.1;
}

.hero-summary {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.mode-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  color: var(--fg);
  padding: 0.1rem 0.25rem;
}

.mode-icon {
  font-size: 0.85rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mode-icon.moon {
  opacity: 0.3;
  transform: translateY(4px);
}

.mode-toggle-input:checked + .mode-toggle-label .sun {
  opacity: 0.3;
  transform: translateY(-4px);
}

.mode-toggle-input:checked + .mode-toggle-label .moon {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 25px rgba(15, 106, 176, 0.22);
}

.btn.secondary {
  background: rgba(15, 106, 176, 0.08);
  color: var(--accent);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(15, 106, 176, 0.22);
  outline: none;
}

.contact-card {
  display: none;
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  gap: 0.8rem;
}

.contact-card.is-visible {
  display: grid;
}

.contact-card > div {
  display: grid;
  gap: 0.2rem;
}

.contact-card dt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section {
  padding: 3.5rem clamp(5vw, 4rem, 12vw);
}

.section.accent {
  background: var(--accent-soft);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
}

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

.section-body {
  max-width: 960px;
}

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.bullet-list li {
  position: relative;
  padding-left: 1.4rem;
}

.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
}

.card-grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--card-bg);
  padding: 1.8rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  display: grid;
  gap: 0.9rem;
}

.card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius) - 6px);
  box-shadow: 0 16px 32px rgba(15, 39, 85, 0.18);
}

.card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.link-list a {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card.compact {
  gap: 0.4rem;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.timeline {
  display: grid;
  gap: 1.8rem;
  border-left: 2px solid rgba(15, 106, 176, 0.18);
  padding-left: 1.5rem;
}

.timeline article {
  position: relative;
}

.timeline article::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 0.4rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(15, 106, 176, 0.12);
}

.timeline-date {
  font-weight: 600;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 0.4rem;
}

.section-body.two-column {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tags span {
  background: var(--card-bg);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  font-weight: 500;
  font-size: 0.95rem;
}

.footer {
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: #0f1b30;
  color: rgba(255, 255, 255, 0.85);
}

.footer p {
  margin: 0.5rem 0;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .hero-topline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .hero-topline .mode-toggle {
    align-self: flex-end;
  }

  .contact-card {
    padding: 1rem 1.2rem;
  }
}
