@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@300;500;700&family=Space+Grotesk:wght@300;500;700&display=swap");

:root {
  color-scheme: dark;
  --ink: #f4eee6;
  --muted: rgba(244, 238, 230, 0.7);
  --surface: rgba(12, 9, 17, 0.7);
  --accent: #f2a85d;
  --accent-strong: #e07c34;
  --dark: #0a0a0f;
  --light: #f4eee6;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #06070b;
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
}

body.static-bg {
  background: radial-gradient(circle at top, rgba(28, 10, 4, 0.9), #090402 65%);
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.6s ease, filter 0.6s ease;
}

body.static-bg #scene {
  opacity: 0.18;
  filter: blur(18px) saturate(0.9);
}

.mesh-glow {
  position: fixed;
  inset: -20% -10% auto;
  height: 65vh;
  background: radial-gradient(circle at 40% 40%, rgba(255, 145, 84, 0.35), transparent 65%),
    radial-gradient(circle at 70% 30%, rgba(108, 164, 255, 0.28), transparent 60%);
  filter: blur(40px);
  z-index: 2;
  pointer-events: none;
}

header {
  position: relative;
  z-index: 10;
}

main {
  position: relative;
  z-index: 1;
}

.nav {
  position: fixed;
  top: 18px;
  z-index: 9999;
  width: min(1200px, calc(100% - 12vw));
  left: 50%;
  transform: translateX(-50%);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(20, 20, 32, 0.4) 0%, rgba(42, 42, 60, 0.22) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px) saturate(1.2);
  transition: border-radius 0.3s ease, box-shadow 0.3s ease, background 1.8s ease, border-color 1.8s ease, filter 1.8s ease;
  overflow: hidden;
}

.nav::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 36px;
  background: radial-gradient(circle at 10% 20%, rgba(242, 168, 93, 0.22), transparent 65%);
  filter: blur(26px);
  z-index: -2;
  transition: background 1.1s ease, opacity 1.1s ease;
}

.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 40px rgba(242, 168, 93, 0.14);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
  transition: background 1.8s ease, box-shadow 1.8s ease, opacity 1.8s ease;
}

.nav.nav-dark {
  background: linear-gradient(180deg, rgba(10, 10, 14, 0.9) 0%, rgba(16, 16, 22, 0.75) 100%);
  border-color: rgba(255, 255, 255, 0.28);
  filter: saturate(0.95) brightness(0.92);
}

.nav.nav-dark::before {
  background: radial-gradient(circle at 10% 20%, rgba(242, 168, 93, 0.16), transparent 65%);
}

.nav.nav-dark::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.01));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 16px 50px rgba(0, 0, 0, 0.45);
  opacity: 0.6;
}

.nav[open] {
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.brand {
  font-family: "Fraunces", serif;
  letter-spacing: 0.2em;
  font-size: 14px;
  text-transform: uppercase;
}

.brand-link {
  color: var(--ink);
  text-decoration: none;
}

.nav-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
}

.nav-summary::-webkit-details-marker {
  display: none;
}

.burger {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
}

.burger::before,
.burger::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 0.25s ease;
}

.burger::before {
  transform: translateY(-4px);
}

.burger::after {
  transform: translateY(4px);
}

.nav[open] .burger::before {
  transform: rotate(45deg);
}

.nav[open] .burger::after {
  transform: rotate(-45deg);
}

.nav-panel {
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.7s ease, opacity 0.4s ease;
  margin: 0;
  display: grid;
  gap: 16px;
  text-align: center;
  padding: 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav[open] .nav-panel {
  opacity: 1;
  pointer-events: auto;
  max-height: 360px;
  padding: 18px 24px 24px;
}

.nav-panel a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 13px;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 10, 0.2);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9998;
}

body:has(.nav[open]) .nav-overlay {
  opacity: 1;
}

.nav-contact {
  margin-top: 4px;
}

.nav-line {
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, rgba(242, 168, 93, 0.0), rgba(242, 168, 93, 0.9), rgba(242, 168, 93, 0.0));
  justify-self: center;
}

.nav-meta {
  font-size: 12px;
  color: rgba(244, 238, 230, 0.6);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.btn {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--light);
  color: #18151b;
  font-weight: 600;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  padding: 120px 0 10vh;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  padding: 0 6vw;
  align-items: center;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-text h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.6rem, 4.6vw, 4.8rem);
  margin: 0 0 16px;
  line-height: 1.05;
}

.hero-title {
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 238, 230, 0.55);
  text-shadow: 0 0 18px rgba(244, 238, 230, 0.15);
}

.hero-text p {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 560px;
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-outline,
.btn-accent {
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
}

.btn-outline {
  border: 1px solid rgba(244, 238, 230, 0.25);
  color: var(--ink);
  background: linear-gradient(180deg, rgba(24, 24, 34, 0.45), rgba(10, 10, 18, 0.2));
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.btn-accent {
  background: linear-gradient(120deg, rgba(242, 168, 93, 0.78), rgba(224, 124, 52, 0.78));
  color: #23140d;
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 24px rgba(224, 124, 52, 0.2);
  border: none;
  cursor: pointer;
}

.hero-panel {
  display: grid;
  gap: 18px;
  background: rgba(7, 7, 12, 0.65);
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.stat {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.stat span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(244, 238, 230, 0.55);
}

.stat strong {
  font-size: 20px;
}

.stat small {
  color: rgba(244, 238, 230, 0.6);
}

.section {
  padding: 80px 6vw;
  scroll-margin-top: 120px;
  position: relative;
  overflow: hidden;
}

.section.light {
  background: rgba(244, 238, 230, 0.08);
}

.section.dark {
  background: rgba(4, 4, 8, 0.82);
}

.section.accent {
  background: linear-gradient(120deg, rgba(242, 168, 93, 0.18), rgba(17, 18, 32, 0.8));
}

.section-edu {
  background:
    radial-gradient(circle at 20% 20%, rgba(242, 168, 93, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(14, 14, 22, 0.95), rgba(8, 8, 12, 0.98));
}

.section-blend::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 120px;
  pointer-events: none;
  background: var(--blend, linear-gradient(180deg, rgba(12, 12, 18, 0.7), rgba(12, 12, 18, 0)));
}

.section.light.section-blend {
  --blend: linear-gradient(180deg, rgba(10, 10, 16, 0.65), rgba(10, 10, 16, 0));
}

.section.dark.section-blend {
  --blend: linear-gradient(180deg, rgba(18, 14, 10, 0.4), rgba(8, 8, 12, 0));
}

.section.accent.section-blend {
  --blend: linear-gradient(180deg, rgba(242, 168, 93, 0.16), rgba(17, 18, 32, 0));
}

.section-edu.section-blend {
  --blend: linear-gradient(180deg, rgba(242, 168, 93, 0.18), rgba(12, 12, 18, 0));
}

.section-head {
  margin-bottom: 32px;
  max-width: 760px;
}

.section-head h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin: 0 0 12px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 22px;
}

.skills-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: rgba(10, 12, 20, 0.7);
  border-radius: 20px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.chip-group span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  color: var(--ink);
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.list li {
  margin-bottom: 8px;
}

.list li:last-child {
  margin-bottom: 0;
}

.experience {
  display: grid;
  gap: 22px;
}

.exp-card {
  background: rgba(10, 12, 20, 0.72);
  border-radius: 20px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.exp-meta {
  color: rgba(244, 238, 230, 0.65);
  margin: 6px 0 0;
  font-size: 14px;
}

.exp-meta-right {
  text-align: right;
  display: grid;
  gap: 4px;
}

.exp-more {
  background: transparent;
  border: none;
  padding: 0;
}

.exp-more summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.exp-more summary::-webkit-details-marker {
  display: none;
}

.exp-more summary::after {
  content: "▾";
  margin-left: 10px;
  color: var(--accent);
}

.exp-more[open] summary::after {
  content: "▴";
}

.exp-more .experience {
  margin-top: 18px;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
}

.cta {
  background: rgba(8, 8, 12, 0.7);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  background: rgba(7, 7, 12, 0.7);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-grid div {
  display: grid;
  gap: 8px;
}

.contact-grid strong {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(244, 238, 230, 0.55);
}

.contact-grid span {
  color: var(--ink);
}

.contact-grid a {
  color: var(--ink);
  text-decoration: none;
}

.contact-grid a:hover {
  color: var(--accent);
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(24, 24, 34, 0.5), rgba(10, 10, 18, 0.25));
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.contact-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  background: rgba(7, 7, 12, 0.65);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-form label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(244, 238, 230, 0.7);
}

.form-row {
  display: grid;
  gap: 8px;
}

.contact-form input,
.contact-form textarea {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 12, 18, 0.65);
  color: var(--ink);
  padding: 12px 14px;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(244, 238, 230, 0.5);
}

.contact-form button {
  justify-self: start;
}

.form-status {
  font-size: 14px;
  color: var(--accent);
}

.contact-form.is-sent .form-row,
.contact-form.is-sent button {
  display: none;
}

.resume-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 10, 0.45);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10050;
}

.resume-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.resume-dialog {
  width: min(860px, calc(100% - 40px));
  height: min(85vh, 720px);
  background: linear-gradient(180deg, rgba(18, 18, 26, 0.75), rgba(10, 10, 18, 0.6));
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px) saturate(1.2);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.resume-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.resume-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.resume-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.resume-zoom-in,
.resume-zoom-out,
.resume-fit,
.resume-rotate,
.resume-print,
.resume-prev,
.resume-next {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
}

.resume-download {
  text-decoration: none;
  color: #23140d;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(242, 168, 93, 0.8), rgba(224, 124, 52, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

.resume-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 16px;
  min-height: 0;
}

.resume-thumbs {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.resume-thumbs canvas {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.resume-thumbs canvas.active {
  border-color: rgba(242, 168, 93, 0.6);
  box-shadow: 0 0 0 1px rgba(242, 168, 93, 0.4);
}

.resume-canvas-wrap {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  background: rgba(10, 10, 16, 0.4);
  border-radius: 20px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 0;
  overflow: auto;
  align-items: start;
}

#resumeCanvas {
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
}

.resume-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .resume-body {
    grid-template-columns: 1fr;
  }

  .resume-thumbs {
    grid-auto-flow: column;
    grid-auto-columns: minmax(100px, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
  }
}

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

.hero-text,
.hero-panel,
.section {
  animation: floatIn 0.8s ease both;
}

.section:nth-of-type(1) { animation-delay: 0.1s; }
.section:nth-of-type(2) { animation-delay: 0.2s; }
.section:nth-of-type(3) { animation-delay: 0.3s; }
.section:nth-of-type(4) { animation-delay: 0.4s; }
.section:nth-of-type(5) { animation-delay: 0.5s; }
.section:nth-of-type(6) { animation-delay: 0.6s; }

@media (max-width: 980px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .nav {
    width: calc(100% - 32px);
    padding: 12px 16px;
  }
}

@media (max-width: 700px) {
  .hero {
    padding-top: 20vh;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-text,
  .hero-panel,
  .section {
    animation: none;
  }
}
