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

:root {
  --max-width: 760px;
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-soft: #141416;
  --text: #f2f2f3;
  --text-soft: #a1a1aa;
  --text-faint: #6b6b73;
  --border: #232326;
  --tag-bg: #1a1a1d;
  --tag-text: #c4c4cc;
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --text: #111114;
  --text-soft: #555560;
  --text-faint: #8a8a94;
  --border: #e6e6e9;
  --tag-bg: #f1f1f3;
  --tag-text: #44444c;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* Theme toggle */

#theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

#theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

html[data-theme="dark"] .icon-sun { display: block; }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: block; }

/* Hero */

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
}

.badge-available {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(44px, 9vw, 76px);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-role {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 500;
  color: var(--text-soft);
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 24px;
}

.dot {
  color: var(--accent);
  margin: 0 6px;
}

.hero-blurb {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 440px;
  margin-bottom: 32px;
}

.hero-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.2s var(--ease);
}

.hero-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-links a.hero-link-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0b;
  font-weight: 600;
}

.hero-links a.hero-link-primary:hover {
  background: transparent;
  color: var(--accent);
}

/* Hero photo */

.hero-photo {
  flex-shrink: 0;
}

.photo-frame {
  width: 220px;
  height: 260px;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px -20px var(--accent-glow);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 28%;
}

.photo-placeholder {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 56px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* Scroll hint */

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* Sections */

main {
  padding: 40px 0;
}

section {
  margin-bottom: 88px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 640px;
}

/* Project card */

.project-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
}

.project-card-head h3 {
  font-size: 21px;
  font-weight: 600;
}

.arrow-link {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}

.arrow-link:hover { color: var(--accent); }

.arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}

.arrow-link:hover .arrow {
  transform: translateX(4px);
}

.project-card p {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 18px;
}

.more-soon {
  color: var(--text-faint);
  font-size: 14px;
  margin-top: 20px;
  text-align: center;
}

/* Feature (image + text) */

.feature {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.feature:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-media {
  background: radial-gradient(circle at 50% 40%, #1a1a1f 0%, #000 100%);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-body .project-card-head {
  margin-bottom: 14px;
}

.feature-body h3 {
  font-size: 21px;
  font-weight: 600;
}

.feature-meta {
  font-size: 13px;
  color: var(--text-faint);
  white-space: nowrap;
}

.feature-body p {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 18px;
}

.feature-links {
  display: flex;
  gap: 24px;
  margin-top: 18px;
}

/* Whole-card clickable: the single link stretches to cover the card */
.feature-clickable {
  position: relative;
  cursor: pointer;
}

.feature-clickable .feature-links a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Jobs */

.job {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.job:last-child {
  border-bottom: none;
}

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.job-head h3 {
  font-size: 19px;
  font-weight: 600;
}

.company-note {
  font-weight: 400;
  color: var(--text-faint);
  font-size: 16px;
}

.job-title {
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 3px;
}

.date {
  font-size: 13px;
  color: var(--text-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  padding-top: 4px;
}

.job > p {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 16px;
}

/* Tags */

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tags li {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 6px;
  transition: background 0.2s;
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 56px;
}

.skill-col h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.skill-col ul {
  list-style: none;
}

.skill-col li {
  font-size: 14px;
  color: var(--text-soft);
  padding: 4px 0;
  position: relative;
  padding-left: 16px;
}

.skill-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-inner p {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
}

.footer-inner a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-inner a:hover { color: var(--accent); }

/* Feature media as button */

button.feature-media {
  border: none;
  cursor: pointer;
  position: relative;
  width: 100%;
  font: inherit;
  color: inherit;
}

.feature-media-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}

button.feature-media:hover .feature-media-hint,
button.feature-media:focus-visible .feature-media-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

button.arrow-link {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

/* PDF modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  animation: fade 0.25s var(--ease);
}

.modal-panel {
  position: relative;
  width: min(900px, 100%);
  height: min(90vh, 100%);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  animation: pop 0.3s var(--ease);
}

.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.modal-open-tab {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.2s;
}

.modal-open-tab:hover { color: var(--accent); }

.modal-close {
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--accent); }

.modal-body {
  flex: 1;
  min-height: 0;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
  html { scroll-behavior: auto; }
}

/* Mobile */

@media (max-width: 680px) {
  .hero {
    min-height: auto;
    padding: 100px 0 60px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 32px;
  }

  .photo-frame {
    width: 130px;
    height: 150px;
  }

  .photo-placeholder { font-size: 36px; }

  .scroll-hint { display: none; }

  section { margin-bottom: 64px; }

  .skills-grid {
    gap: 28px 32px;
  }

  .job-head {
    flex-direction: column;
    gap: 4px;
  }

  .date { padding-top: 0; }

  .feature {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-media {
    max-width: 240px;
    margin: 0 auto;
  }
}
