[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-soft: #12192a;
  --surface: #101827;
  --surface-strong: #162033;
  --text: #e6edf7;
  --muted: #93a1b8;
  --border: rgba(147, 161, 184, 0.16);
  --accent: #4ade80;
  --accent-soft: rgba(74, 222, 128, 0.12);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] {
  --bg: #f5f8fc;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-strong: #eef4fb;
  --text: #122033;
  --muted: #5d6b7e;
  --border: rgba(18, 32, 51, 0.12);
  --accent: #0f9d8a;
  --accent-soft: rgba(15, 157, 138, 0.1);
  --shadow: 0 14px 28px rgba(18, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #0a0f1a 0%, #0d1320 100%);
  --mouse-x: 50%;
  --mouse-y: 50%;
}

[data-theme="light"] body {
  background:
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 96%);
}

[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(18, 32, 51, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 32, 51, 0.04) 1px, transparent 1px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      320px circle at var(--mouse-x) var(--mouse-y),
      rgba(74, 222, 128, 0.09),
      transparent 55%
    );
  z-index: 0;
}

[data-theme="light"] body::after {
  background:
    radial-gradient(
      320px circle at var(--mouse-x) var(--mouse-y),
      rgba(15, 157, 138, 0.08),
      transparent 55%
    );
}

.bg-orb {
  display: none;
}

.orb-one {
  top: 10%;
  left: -4rem;
  background: #60a5fa;
}

.orb-two {
  right: -4rem;
  bottom: 15%;
  background: #6ee7b7;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(10, 15, 26, 0.9);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .site-header {
  background: rgba(245, 248, 252, 0.86);
}

.nav-shell,
.section-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand,
.nav-links a,
.button,
.project-links a,
.contact-card,
.footer-links a,
.hero-links a {
  text-decoration: none;
}

.brand,
h1,
h2,
h3 {
  font-family: "Syne", sans-serif;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.08);
  flex-shrink: 0;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.brand-avatar-button:hover .brand-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 180ms ease;
}

.nav-links a:hover,
.hero-links a:hover,
.project-links a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  font-size: 0.95rem;
  line-height: 1;
}

[data-theme="light"] .theme-toggle {
  background: rgba(18, 32, 51, 0.02);
}

.section {
  padding: 5rem 0;
}

.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.skill-card,
.project-card,
.timeline-card,
.contact-card,
.highlight-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.hero-copy,
.hero-panel {
  border-radius: 18px;
  padding: 2rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
.section-heading h2 {
  margin: 0;
  line-height: 0.96;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  max-width: 11ch;
}

.hero-role {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  font-family: "Space Grotesk", sans-serif;
}

.hero-text,
.about-copy p,
.timeline-card ul,
.project-card p,
.contact-copy,
.highlight-strip p {
  line-height: 1.7;
}

.hero-text {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions,
.hero-links,
.tag-row,
.project-links,
.footer-links,
.chip-grid,
.contact-grid {
  display: flex;
  flex-wrap: wrap;
}

.hero-actions {
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero-links {
  gap: 1.25rem;
  margin-top: 2rem;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: #08110f;
}

[data-theme="light"] .button-primary {
  color: #f8fffe;
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .button-secondary {
  background: rgba(18, 32, 51, 0.02);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-panel {
  position: relative;
  overflow: hidden;
}

.panel-label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.hero-panel h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.1;
}

.signal-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.signal-list li {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

[data-theme="light"] .signal-list li,
[data-theme="light"] .highlight-strip {
  background: var(--surface-strong);
}

.hero-copy:hover,
.hero-panel:hover,
.skill-card:hover,
.project-card:hover,
.timeline-card:hover,
.contact-card:hover,
.highlight-strip:hover {
  border-color: rgba(74, 222, 128, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.section-heading {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  max-width: 14ch;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
}

.about-copy {
  color: var(--muted);
}

.chip-grid {
  gap: 0.8rem;
  align-content: start;
}

.chip-grid span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

[data-theme="light"] .chip-grid span,
[data-theme="light"] .tag-row span {
  background: rgba(18, 32, 51, 0.03);
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(154, 168, 199, 0.18);
}

.timeline-item {
  position: relative;
  padding-left: 2.8rem;
}

.timeline-marker {
  position: absolute;
  left: 8px;
  top: 1.2rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(110, 231, 183, 0.08);
}

.timeline-card {
  border-radius: 16px;
  padding: 1.5rem;
}

.timeline-date,
.timeline-company,
.contact-card span,
.project-topline {
  color: var(--muted);
}

.timeline-date {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.timeline-card h3,
.project-card h3,
.skill-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.timeline-company {
  margin: 0.4rem 0 1rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.skills-grid,
.projects-grid,
.contact-grid {
  display: grid;
  gap: 1rem;
}

.skills-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.skill-card,
.project-card,
.contact-card,
.highlight-strip {
  border-radius: 16px;
  padding: 1.4rem;
}

.skill-card h3 {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.1rem;
}

.tag-row {
  gap: 0.65rem;
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-topline {
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.project-links {
  gap: 1rem;
}

.project-links a {
  color: var(--accent);
  font-weight: 500;
}

.mouse-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.contact-copy {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-card {
  color: var(--text);
}

.contact-card span {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.contact-card p {
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

.highlight-strip {
  margin-top: 1rem;
  background: var(--surface-strong);
}

.highlight-strip p {
  margin: 0;
  color: var(--muted);
}

.highlight-strip strong {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid rgba(154, 168, 199, 0.12);
  padding: 1.5rem 0 2.5rem;
}

[data-theme="light"] .site-footer {
  border-top: 1px solid var(--border);
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  gap: 1.25rem;
}

.site-footer p {
  color: var(--muted);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--muted);
  text-decoration: none;
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.footer-icon-button:hover {
  transform: translateY(-2px);
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.footer-icon-button svg {
  width: 22px;
  height: 22px;
  display: block;
}

[data-theme="light"] .footer-icon-button {
  background: var(--surface-strong);
}

.footer-top-button {
  background: var(--accent);
  color: #08110f;
  border-color: transparent;
}

.footer-top-button:hover {
  color: #08110f;
  border-color: transparent;
  background: #6df0aa;
}

[data-theme="light"] .footer-top-button {
  color: #f8fffe;
}

.photo-modal[hidden] {
  display: none;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 6, 16, 0.82);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.photo-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 2rem));
  padding: 0.75rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.photo-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #ffffff;
  color: var(--accent);
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.photo-modal-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.12);
  cursor: pointer;
  transform-origin: center;
  transform-style: preserve-3d;
}

.photo-modal-image.is-flipping {
  animation: photo-flip-preview 650ms ease both;
}

@keyframes photo-flip-preview {
  0% {
    opacity: 0;
    transform: perspective(900px) rotateY(180deg) scale(0.86);
  }

  70% {
    opacity: 1;
    transform: perspective(900px) rotateY(350deg) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: perspective(900px) rotateY(360deg) scale(1);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal-delay {
  transition-delay: 140ms;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-layout,
  .about-layout,
  .skills-grid,
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-shell,
  .nav-controls,
  .footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding: 4.5rem 0;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .hero-copy,
  .hero-panel,
  .skill-card,
  .project-card,
  .timeline-card,
  .contact-card,
  .highlight-strip {
    border-radius: 14px;
  }

  h1 {
    font-size: clamp(2.5rem, 13vw, 4.4rem);
  }

  .section-heading h2 {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    display: none;
  }

  .mouse-card,
  .hero-copy,
  .hero-panel,
  .skill-card,
  .project-card,
  .timeline-card,
  .contact-card,
  .highlight-strip {
    transition: none;
    transform: none !important;
  }
}
