:root {
  --bg: #0a0a0c;
  --bg-soft: #0f0f12;
  --panel: #16161a;
  --panel-bright: #1a1a1e;
  --text: #f5f5f0;
  --muted: #b0b0b0;
  --dim: #808080;
  --accent: #cd0000;
  --accent-soft: rgba(205, 0, 0, 0.14);
  --border: rgba(205, 0, 0, 0.28);
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.portfolio-wrap {
  min-height: 100%;
  overflow-x: hidden;
}

.nav-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid rgba(205, 0, 0, 0.1);
  background: rgba(15, 15, 18, 0.95);
  backdrop-filter: blur(16px);
}

.nav-inner {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
h1,
h2,
h3 {
  font-family: "Syne", system-ui, sans-serif;
}

.brand {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-menu,
.nav-socials,
.hero-actions,
.work-actions,
.contact-socials {
  display: flex;
  align-items: center;
}

.nav-menu {
  gap: 32px;
  color: #e0e0e0;
  font-size: 0.92rem;
  font-weight: 500;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 0;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active::after {
  width: 100%;
}

.nav-socials {
  gap: 16px;
  color: var(--accent);
}

.nav-socials a,
.contact-socials a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  transition: transform 0.25s ease, color 0.25s ease;
}

.nav-socials a:hover,
.contact-socials a:hover {
  transform: translateY(-2px) scale(1.08);
}

.nav-socials svg,
.contact-socials svg {
  width: 21px;
  height: 21px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
}

.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 128px 24px 88px;
  background: var(--bg);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.grain-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 128px;
  animation: grain 8s steps(10) infinite;
}

.glow {
  position: absolute;
  border-radius: 999px;
  background: var(--accent);
  filter: blur(56px);
  animation: float 4s ease-in-out infinite;
}

.glow-large {
  top: 18%;
  right: 8%;
  width: 190px;
  height: 190px;
  opacity: 0.2;
}

.glow-small {
  left: 8%;
  bottom: 16%;
  width: 130px;
  height: 130px;
  opacity: 0.12;
  animation-delay: 2s;
}

.hero-content {
  width: min(100%, 960px);
  display: grid;
  justify-items: center;
  max-width: calc(100vw - 48px);
  overflow: hidden;
}

.eyebrow,
.section-label {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 22px;
  color: var(--text);
  font-size: clamp(2.25rem, 13vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 100%;
}

.hero-portrait-wrap {
  position: relative;
  width: min(58vw, 340px);
  margin: 0 auto 18px;
}

.hero-portrait-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3%;
  width: 68%;
  height: 20%;
  border-radius: 50%;
  background: rgba(205, 0, 0, 0.18);
  filter: blur(24px);
  transform: translateX(-50%);
  z-index: -1;
}

.hero-portrait {
  display: block;
  width: 100%;
  height: auto;
  max-height: 430px;
  object-fit: contain;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.38));
}

.hero-tagline {
  margin: 0 0 18px;
  color: #e0e0e0;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 600;
}

.hero-description {
  width: min(100%, 580px);
  margin: 0 auto 38px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.work-actions {
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px) scale(1.02);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  background: var(--accent);
  color: var(--bg);
}

.button-secondary {
  border-color: var(--accent);
  color: var(--text);
  background: transparent;
}

.button-muted {
  border-color: var(--border);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
}

.section {
  scroll-margin-top: 88px;
  background: var(--bg-soft);
  padding: 112px 0;
}

.section-contrast {
  background: var(--panel-bright);
}

.section-deep {
  background: var(--bg);
}

.section-inner {
  width: min(100% - 48px, 960px);
  margin: 0 auto;
}

h2 {
  margin: 0 0 56px;
  color: var(--text);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.05;
}

.accent-heading {
  color: var(--accent);
}

h3 {
  margin: 0;
  color: var(--accent);
  font-size: 1.55rem;
}

.body-large {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 56px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(205, 0, 0, 0.22);
  border-radius: 999px;
  background: rgba(205, 0, 0, 0.1);
  color: var(--accent);
  font-weight: 700;
  transition: transform 0.25s ease;
}

.skill-pill:hover {
  transform: translateY(-3px);
}

.timeline {
  display: grid;
  gap: 24px;
}

.education-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-bright);
}

.education-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.education-main svg {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  color: var(--accent);
}

.education-main h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.2rem;
}

.education-main p,
.education-main span {
  display: block;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.education-main span {
  margin-top: 12px;
  color: var(--dim);
}

.education-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.education-meta strong {
  padding: 8px 14px;
  border: 1px solid rgba(205, 0, 0, 0.22);
  border-radius: 999px;
  background: rgba(205, 0, 0, 0.1);
  color: var(--accent);
  font-size: 0.88rem;
}

.education-meta span {
  color: var(--dim);
  font-size: 0.82rem;
}

.tabs-container {
  display: flex;
  gap: 22px;
  margin-bottom: 44px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  scroll-behavior: smooth;
}

.tabs-container::-webkit-scrollbar {
  height: 2px;
}

.tabs-container::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(205, 0, 0, 0.3);
}

.tab-button {
  padding: 0 20px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--dim);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.tab-button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.tab-pane {
  animation: fadeUp 0.4s ease-out both;
}

.tab-pane.hidden {
  display: none;
}

.tab-pane h3 {
  margin-bottom: 22px;
}

.info-panel,
.work-card {
  padding: 32px;
  border-radius: 8px;
  background: var(--panel);
}

.info-panel p,
.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.work-card p {
  margin-bottom: 28px;
  color: #a3a3a3;
  text-align: center;
}

.contact {
  position: relative;
  background: var(--bg-soft);
  isolation: isolate;
}

.contact-inner {
  width: min(100% - 48px, 720px);
  margin: 0 auto;
  text-align: center;
}

.contact h2 {
  margin-bottom: 20px;
}

.contact-form {
  display: grid;
  gap: 18px;
  margin-top: 44px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(205, 0, 0, 0.22);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 16px 18px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(205, 0, 0, 0.18);
}

.contact-form button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.contact-form button:hover {
  transform: translateY(-2px) scale(1.01);
}

.contact-socials {
  justify-content: center;
  gap: 24px;
  margin-top: 36px;
  color: var(--dim);
}

footer {
  padding: 30px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg);
  color: #666;
  text-align: center;
}

footer p {
  margin: 0;
}

.success-message {
  position: fixed;
  top: 92px;
  right: 20px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 40px));
  padding: 16px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  animation: slideInRight 0.35s ease-out both;
}

.music-toggle {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(15, 15, 18, 0.95);
  color: var(--accent);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.music-toggle:hover,
.music-toggle:focus-visible {
  transform: translateY(-2px) scale(1.04);
}

.music-toggle.is-muted {
  background: var(--accent);
  color: var(--bg);
}

.music-toggle svg {
  width: 23px;
  height: 23px;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.anim-fade-up {
  animation: fadeUp 0.8s ease-out both;
}

.anim-fade-up-d1 {
  animation: fadeUp 0.8s 0.15s ease-out both;
}

.anim-fade-up-d2 {
  animation: fadeUp 0.8s 0.3s ease-out both;
}

.anim-fade-up-d3 {
  animation: fadeUp 0.8s 0.45s ease-out both;
}

.anim-fade-up-d4 {
  animation: fadeUp 0.8s 0.6s ease-out both;
}

.anim-scale-in {
  animation: scaleIn 0.7s 0.2s ease-out both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-2%, -2%);
  }

  30% {
    transform: translate(3%, 1%);
  }

  50% {
    transform: translate(-1%, 3%);
  }

  70% {
    transform: translate(2%, -1%);
  }

  90% {
    transform: translate(-3%, 2%);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 760px) {
  .nav-inner {
    width: min(100% - 32px, 1120px);
    min-height: 84px;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .menu-toggle {
    display: none;
  }

  .nav-menu {
    order: 3;
    display: flex;
    width: 100%;
    gap: 24px;
    padding: 4px 0 8px;
  }

  .nav-link {
    padding: 4px 0 8px;
  }

  .nav-link::after {
    display: block;
    bottom: 0;
  }

  .nav-socials {
    margin-left: auto;
    gap: 10px;
  }

  .hero {
    min-height: 92vh;
    padding: 144px 16px 72px;
    width: 100%;
    max-width: 100vw;
  }

  .hero-portrait-wrap {
    width: min(64vw, 250px);
    margin-bottom: 14px;
  }

  .hero-content {
    width: min(100%, 360px);
    max-width: calc(100vw - 44px);
    margin: 0 auto;
  }

  .hero-title {
    width: auto;
    max-width: calc(100vw - 56px);
    font-size: clamp(1.95rem, 12.3vw, 3rem) !important;
    letter-spacing: 0;
    text-align: center;
  }

  .hero-tagline,
  .hero-description {
    max-width: calc(100vw - 40px);
  }

  html {
    scroll-padding-top: 112px;
  }

  .section {
    scroll-margin-top: 112px;
  }

  .hero-actions,
  .work-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section {
    padding-left: 0;
    padding-right: 0;
  }

  .section-inner,
  .contact-inner {
    width: min(100% - 32px, 960px);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .education-card {
    flex-direction: column;
  }

  .education-meta {
    align-items: flex-start;
  }

  .music-toggle {
    left: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }
}
