:root {
  --bg: #080a0e;
  --bg-soft: #0d1219;
  --surface: #121822;
  --surface-2: #182131;
  --ink: #eef2f8;
  --muted: #95a0b5;
  --line: rgba(238, 242, 248, 0.08);
  --accent: #3ecfbe;
  --accent-2: #f0b45a;
  --accent-glow: rgba(62, 207, 190, 0.22);
  --warm-glow: rgba(240, 180, 90, 0.14);
  --radius: 18px;
  --nav-h: 72px;
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--accent-glow), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, var(--warm-glow), transparent 50%),
    linear-gradient(180deg, #07090d 0%, #0a0f16 45%, #080a0e 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orb {
  pointer-events: none;
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: float 14s var(--ease) infinite alternate;
}

.orb-a {
  width: 320px;
  height: 320px;
  top: 18%;
  left: -80px;
  background: var(--accent);
}

.orb-b {
  width: 280px;
  height: 280px;
  bottom: 10%;
  right: -60px;
  background: var(--accent-2);
  animation-delay: -4s;
}

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -30px, 0) scale(1.08); }
}

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.1rem, 3vw, 2.4rem);
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease), border-color 0.35s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  z-index: 51;
}

.nav__brand span {
  color: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav__links a {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.25s;
}

.nav__links a:hover {
  color: var(--ink);
}

.nav__cta {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(62, 207, 190, 0.35);
  color: var(--accent) !important;
  background: rgba(62, 207, 190, 0.08);
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  gap: 6px;
  z-index: 51;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav__toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: end;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.04);
  animation: heroZoom 12s var(--ease) forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1.02); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.92) 0%, rgba(8, 10, 14, 0.78) 42%, rgba(8, 10, 14, 0.35) 70%, rgba(8, 10, 14, 0.55) 100%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.35) 0%, rgba(8, 10, 14, 0.15) 40%, rgba(8, 10, 14, 0.92) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  grid-column: 1;
  padding: calc(var(--nav-h) + 3.5rem) clamp(1.25rem, 4vw, 4rem) 5.5rem;
  max-width: 680px;
}

.hero__eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
  animation: nameIn 1s var(--ease) both;
}

@keyframes nameIn {
  from { opacity: 0; transform: translateY(28px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero__lead {
  margin: 1.35rem 0 0;
  max-width: 34rem;
  color: #c4ccd9;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #2bb8a9);
  color: #041512;
  box-shadow: 0 12px 30px rgba(62, 207, 190, 0.28);
}

.btn--ghost {
  border: 1px solid rgba(238, 242, 248, 0.18);
  background: rgba(8, 10, 14, 0.35);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: rgba(62, 207, 190, 0.45);
}

.hero__scroll {
  position: absolute;
  z-index: 3;
  left: clamp(1.25rem, 4vw, 4rem);
  bottom: 1.5rem;
  width: 28px;
  height: 44px;
  border: 1px solid rgba(238, 242, 248, 0.25);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}

.hero__scroll span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: scrollDot 1.6s var(--ease) infinite;
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(16px); opacity: 0; }
}

/* Sections */
.section {
  position: relative;
  z-index: 2;
  padding: clamp(4.5rem, 10vw, 7.5rem) 0;
}

.section__head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.section__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section__sub {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.about__copy p {
  margin: 0 0 1rem;
  color: #c8d0de;
  font-size: 1.08rem;
}

.about__copy strong {
  color: var(--accent);
  font-weight: 700;
}

.about__highlights {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.about__highlights li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-weight: 500;
}

.about__highlights span {
  font-size: 1.2rem;
}

.about__facts {
  display: grid;
  gap: 0.85rem;
}

.fact {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(24, 33, 49, 0.85), rgba(12, 16, 24, 0.9));
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.fact:hover {
  border-color: rgba(62, 207, 190, 0.35);
  transform: translateY(-3px);
}

.fact__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.fact__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.fact__value {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

/* Skills */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.skill-group {
  padding: 1.35rem 1.3rem 1.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(62, 207, 190, 0.05), transparent 40%),
    var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.skill-group:hover {
  transform: translateY(-5px);
  border-color: rgba(62, 207, 190, 0.28);
  box-shadow: var(--shadow);
}

.skill-group h3 {
  margin: 0 0 0.95rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.skill-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.skill-group li {
  color: var(--muted);
  padding-left: 0.9rem;
  position: relative;
}

.skill-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Projects — interaction containers */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 1.35rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(240, 180, 90, 0.1), transparent 55%),
    linear-gradient(165deg, #151c28, #10151e);
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.project:hover {
  transform: translateY(-6px);
  border-color: rgba(240, 180, 90, 0.35);
  box-shadow: var(--shadow);
}

.project__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.project__emoji {
  font-size: 1.7rem;
}

.project__link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.project h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.project p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  flex: 1;
}

.project__url {
  margin-top: 1.2rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Apps */
.apps__list {
  display: grid;
  gap: 0.85rem;
}

.app {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 24, 34, 0.85);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.app:hover {
  transform: translateX(6px);
  border-color: rgba(62, 207, 190, 0.3);
  background: rgba(24, 33, 49, 0.95);
}

.app__emoji {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  background: linear-gradient(145deg, rgba(62, 207, 190, 0.16), rgba(240, 180, 90, 0.1));
  border: 1px solid rgba(62, 207, 190, 0.18);
}

.app h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.app p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.app__store {
  display: inline-block;
  margin-top: 0.45rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Education */
.timeline {
  display: grid;
  gap: 1rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.45;
}

.timeline__item {
  position: relative;
  padding: 1.2rem 1.2rem 1.2rem 2.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.55rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(62, 207, 190, 0.12);
}

.timeline__date {
  display: inline-block;
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.timeline__item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.timeline__item p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.timeline__note {
  color: #c5cddc !important;
  font-weight: 500;
}

/* Contact */
.contact {
  padding-bottom: 5rem;
}

.contact__wrap {
  border-radius: 28px;
  padding: clamp(1.8rem, 5vw, 3.2rem);
  border: 1px solid rgba(62, 207, 190, 0.18);
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(62, 207, 190, 0.14), transparent 55%),
    radial-gradient(600px 260px at 90% 100%, rgba(240, 180, 90, 0.1), transparent 50%),
    linear-gradient(160deg, #101722, #0b1018);
}

.contact__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.contact__card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 14, 0.45);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.contact__card:hover {
  transform: translateY(-4px);
  border-color: rgba(62, 207, 190, 0.35);
}

.contact__card span {
  font-size: 1.4rem;
}

.contact__card strong {
  display: block;
  font-size: 0.9rem;
}

.contact__card em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.92rem;
  word-break: break-word;
}

/* Footer */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer a:hover {
  color: var(--accent);
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.hero .reveal {
  transition-delay: 0.08s;
}

.hero .hero__lead.reveal { transition-delay: 0.18s; }
.hero .hero__actions.reveal { transition-delay: 0.28s; }

/* Lucide fallback if font icons missing */
.icon-external-link::before {
  content: "↗";
  font-style: normal;
}

/* Responsive */
@media (max-width: 1100px) {
  .skills__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 980px) {
  .skills__grid,
  .projects__grid,
  .contact__actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav__toggle {
    display: grid;
  }

  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(7, 9, 13, 0.96);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.3s;
  }

  .nav__links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav__links a {
    font-size: 1.35rem;
    color: var(--ink);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 100svh;
  }

  .hero__content {
    padding-top: calc(var(--nav-h) + 5.5rem);
    padding-bottom: 5rem;
  }

  .hero__veil {
    background:
      linear-gradient(180deg, rgba(8, 10, 14, 0.45) 0%, rgba(8, 10, 14, 0.55) 35%, rgba(8, 10, 14, 0.94) 72%),
      linear-gradient(90deg, rgba(8, 10, 14, 0.55), rgba(8, 10, 14, 0.2));
  }

  .hero__media img {
    object-position: center 12%;
  }
}

@media (max-width: 560px) {
  .skills__grid,
  .projects__grid,
  .contact__actions {
    grid-template-columns: 1fr;
  }

  .hero__name {
    font-size: clamp(2.6rem, 12vw, 3.4rem);
  }

  .container {
    width: min(1120px, calc(100% - 1.5rem));
  }

  .contact__wrap {
    padding: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
