:root {
  --bg: hsl(0, 0%, 0%);
  --text: #e9ebf3;
  --muted: #9aa3b8;
  --faint: #5d6579;
  --accent: #ffb36b;
  --accent-2: #ffd9a8;
  --cool: #5a7a9b;
  --glass: rgba(16, 19, 30, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --max: 1160px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
strong { color: var(--text); font-weight: 600; }
::selection { background: rgba(255, 179, 107, .35); }

#space {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100vh; height: 100lvh;
  z-index: -2;
  display: block;
  pointer-events: none;
}

.container { width: min(var(--max), 100% - 3rem); margin-inline: auto; }

.accent { color: var(--accent); }
.gradient-text {
  background: linear-gradient(100deg, #fff1df 0%, var(--accent) 45%, #ff7d4d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, -100%) var(--my, -100%),
              rgba(255, 179, 107, .10), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.glass:hover::before { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  font-family: var(--font-head); font-weight: 500; font-size: .95rem; letter-spacing: .01em;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, border-color .3s;
  border: 1px solid transparent; cursor: pointer;
}
.btn--primary {
  background: linear-gradient(120deg, #ffd4a3, var(--accent) 55%, #ff8a55);
  color: #1a0f05;
  box-shadow: 0 0 0 0 rgba(255,179,107,.0), 0 10px 30px -10px rgba(255,140,70,.6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 30px -4px rgba(255,170,100,.55), 0 14px 34px -12px rgba(255,140,70,.8); }
.btn--ghost { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.03); }
.btn--ghost:hover { border-color: rgba(255,179,107,.6); transform: translateY(-2px); }
.btn--small { padding: .5rem 1.1rem; font-size: .85rem; border-color: rgba(255,179,107,.45); color: var(--accent-2) !important; }
.btn--small:hover { background: rgba(255,179,107,.12); }
.btn--large { padding: 1.05rem 2rem; font-size: 1.05rem; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--glass-border);
  padding-block: .85rem;
}
.nav__logo { display: flex; align-items: center; gap: .65rem; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
.nav__logo-mark {
  width: 22px; height: 22px; border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 2px var(--accent), 0 0 14px 2px rgba(255,170,100,.6);
  position: relative;
}
.nav__logo-mark::after {
  content: ""; position: absolute; left: -7px; right: -7px; top: 50%; height: 5px;
  transform: translateY(-50%) rotate(-12deg);
  border: 1.5px solid var(--accent-2); border-radius: 50%;
}
.nav__links { display: flex; align-items: center; gap: 2rem; font-size: .92rem; }
.nav__links a:not(.btn) { color: var(--muted); position: relative; transition: color .3s; }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:not(.btn):hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; width: 34px; height: 34px; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 6px; right: 6px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, top .3s; }
.nav__toggle span:first-child { top: 12px; }
.nav__toggle span:last-child { top: 20px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 16px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 16px; transform: rotate(-45deg); }

.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  position: relative;
  padding: 7rem 0 5rem;
}
.hero__text { max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2);
  padding: .45rem .95rem; border-radius: 999px;
  border: 1px solid rgba(255,179,107,.25); background: rgba(255,179,107,.06);
  margin-bottom: 1.75rem;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero__title {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.1rem, 4.4vw, 3.7rem);
  line-height: 1.07; letter-spacing: -.03em;
  margin-bottom: 1.5rem;
}
.rotator {
  display: block; white-space: nowrap; color: var(--muted);
  transition: opacity .45s, transform .45s var(--ease), filter .45s;
}
.rotator.is-out { opacity: 0; transform: translateY(12px); filter: blur(6px); }
.hero__lead { color: var(--muted); font-size: 1.12rem; max-width: 520px; margin-bottom: 2.5rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.25);
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--accent-2); border-radius: 2px; animation: scroll 2.2s var(--ease) infinite;
}
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.section { padding: clamp(5rem, 11vw, 9rem) 0; position: relative; }
.section__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 3rem; }
.section__head h2, .contact h2 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -.02em;
}
.section__head::after {
  content: ""; flex: 1; height: 1px; align-self: center;
  background: linear-gradient(90deg, rgba(255,255,255,.14), transparent);
}
.section__index { font-family: var(--font-head); font-size: .9rem; color: var(--accent); letter-spacing: .1em; }

.about { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3.5rem; align-items: center; }
.about__text p { color: var(--muted); font-size: 1.08rem; margin-bottom: 1.25rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stats li { padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .3rem; }
.stats strong { font-family: var(--font-head); font-size: 2.4rem; line-height: 1; color: var(--accent-2); font-weight: 600; }
.stats span { color: var(--muted); font-size: .9rem; }

.tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.tags li {
  font-size: .76rem; padding: .28rem .7rem; border-radius: 999px;
  color: var(--accent-2); background: rgba(255,179,107,.07); border: 1px solid rgba(255,179,107,.18);
}

.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.skill-card { padding: 1.9rem 1.6rem; display: flex; flex-direction: column; gap: .85rem; transition: transform .4s var(--ease), border-color .4s; }
.skill-card:hover { transform: translateY(-6px); border-color: rgba(255,179,107,.3); }
.skill-card__icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(255,179,107,.18), rgba(138,180,255,.08));
  border: 1px solid rgba(255,179,107,.25);
}
.skill-card__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skill-card h3 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; }
.skill-card p { color: var(--muted); font-size: .93rem; flex: 1; }

.featured { display: grid; grid-template-columns: 1fr 1.25fr; margin-bottom: 1.5rem; min-height: 340px; }
.featured__visual { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(255,150,80,.14), transparent 65%); }
.featured__core {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6e6, var(--accent) 45%, #c4531f);
  box-shadow: 0 0 40px 8px rgba(255,160,90,.45);
}
.orbit { position: absolute; left: 50%; top: 50%; border: 1px dashed rgba(255,255,255,.14); border-radius: 50%; animation: spin linear infinite; }
.orbit span { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--cool); box-shadow: 0 0 12px var(--cool); }
.orbit--1 { width: 120px; height: 120px; margin: -60px; animation-duration: 12s; }
.orbit--2 { width: 200px; height: 200px; margin: -100px; animation-duration: 22s; animation-direction: reverse; }
.orbit--2 span { background: #9be7b0; box-shadow: 0 0 12px #9be7b0; }
.orbit--3 { width: 290px; height: 290px; margin: -145px; animation-duration: 36s; }
.orbit--3 span { background: var(--accent-2); box-shadow: 0 0 12px var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.featured__body { padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.featured__body h3 { font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; letter-spacing: -.02em; }
.featured__body p { color: var(--muted); }
.badge { align-self: flex-start; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cool); }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.project { padding: 1.75rem 1.6rem; display: flex; flex-direction: column; gap: .9rem; transition: transform .4s var(--ease), border-color .4s; }
.project:hover { transform: translateY(-6px); border-color: rgba(255,179,107,.3); }
.project__top { display: flex; justify-content: space-between; font-size: .78rem; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.project__type { color: var(--cool); }
.project h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; }
.project p { color: var(--muted); font-size: .93rem; flex: 1; }

.timeline { position: relative; display: grid; gap: 1.25rem; padding-left: 2.25rem; max-width: 820px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--accent), rgba(138,180,255,.5), transparent);
}
.timeline__item { position: relative; }
.timeline__dot {
  position: absolute; left: calc(-2.25rem + 2px); top: 1.6rem; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 12px rgba(255,179,107,.6);
}
.timeline__card { padding: 1.35rem 1.6rem; }
.timeline__card h3 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; margin-bottom: .3rem; }
.timeline__card p { color: var(--muted); font-size: .93rem; }

.contact__card { text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.contact__card p { color: var(--muted); max-width: 480px; margin-bottom: .75rem; }
.socials { display: flex; gap: .85rem; margin-top: .75rem; }
.socials a {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.14); transition: border-color .3s, transform .3s var(--ease), background .3s;
}
.socials a:hover { border-color: var(--accent); transform: translateY(-3px); background: rgba(255,179,107,.08); }
.socials svg { width: 19px; height: 19px; fill: var(--text); }

.footer { text-align: center; padding: 2.5rem 1rem 3rem; color: var(--faint); font-size: .85rem; }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .skills { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(300px, 80vw);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.75rem;
    padding: 2rem 2.5rem; font-size: 1.1rem;
    background: rgba(0, 0, 0, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid var(--glass-border);
    transform: translateX(100%); transition: transform .45s var(--ease);
  }
  .nav__links.is-open { transform: none; }
  .nav__toggle { z-index: 2; }
  .hero { align-items: flex-end; padding: 44vh 0 6rem; padding-top: 44svh; }
  .eyebrow { font-size: .7rem; letter-spacing: .1em; white-space: nowrap; }
  .hero__title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hero__text { text-align: center; margin-inline: auto; }
  .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .about { grid-template-columns: 1fr; gap: 2.5rem; }
  .featured { grid-template-columns: 1fr; }
  .featured__visual { min-height: 260px; }
}
@media (max-width: 600px) {
  .skills, .projects { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (hover: none), (max-width: 860px) {
  .glass, .nav.is-scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .glass { background: rgba(12, 14, 22, 0.86); }
  .nav.is-scrolled { background: rgba(0, 0, 0, 0.9); }
  .nav__links { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .glass::before { display: none; }
  .rotator.is-out { filter: none; }
}
