:root {
  --bg: #0b0d14;
  --bg-2: #11141f;
  --card: #151926;
  --border: #232838;
  --text: #e7e9f0;
  --muted: #9097ab;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 16px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(500px circle at 85% 40%, rgba(34, 211, 238, 0.10), transparent 60%);
}

.container { width: min(1100px, 100% - 32px); margin-inline: auto; }
section { padding: 110px 0; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(16px, calc((100% - 1100px) / 2));
  transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 13, 20, 0.8);
  backdrop-filter: blur(12px);
  border-color: var(--border);
  padding-block: 12px;
}
.logo {
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { padding: 8px 18px; border: 1px solid var(--accent); border-radius: 999px; color: var(--text) !important; }
.nav-cta:hover { background: rgba(124, 92, 255, .15); }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; width: 32px; height: 24px; position: relative; }
.menu-btn span { position: absolute; left: 0; right: 0; height: 2px; background: var(--text); transition: .3s; }
.menu-btn span:first-child { top: 6px; }
.menu-btn span:last-child { bottom: 6px; }
.menu-btn.open span:first-child { top: 11px; transform: rotate(45deg); }
.menu-btn.open span:last-child { bottom: 11px; transform: rotate(-45deg); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px -8px rgba(124, 92, 255, .6); }
.btn-primary:hover { box-shadow: 0 12px 36px -8px rgba(124, 92, 255, .8); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- HERO ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; padding-top: 120px; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent-2); font-weight: 500; margin-bottom: 8px; letter-spacing: .05em; }
h1 {
  font-family: var(--font-head); font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.05; letter-spacing: -0.02em;
}
.typed {
  font-family: var(--font-head); font-size: clamp(1.3rem, 3.4vw, 2rem); color: var(--muted);
  margin: 10px 0 22px; min-height: 1.4em; font-weight: 500;
}
#typed { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.caret { color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 32px 0 28px; }

.socials { display: flex; gap: 12px; flex-wrap: wrap; }
.socials a {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 12px; color: var(--muted);
  transition: color .2s, border-color .2s, transform .2s;
}
.socials a:hover { color: var(--text); border-color: var(--accent); transform: translateY(-3px); }
.socials svg { width: 19px; height: 19px; fill: currentColor; }

.hero-photo { display: flex; justify-content: center; }
.photo-ring {
  width: min(340px, 75vw); aspect-ratio: 1; border-radius: 50%; padding: 4px;
  background: var(--grad); animation: float 6s ease-in-out infinite;
  box-shadow: 0 30px 80px -20px rgba(124, 92, 255, .5);
}
.photo {
  width: 100%; height: 100%; border-radius: 50%; background: var(--bg-2) center/cover no-repeat;
  display: grid; place-items: center; font-family: var(--font-head); font-size: 5rem; font-weight: 700; color: var(--text);
}
@keyframes float { 50% { transform: translateY(-14px); } }

.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 38px; border: 2px solid var(--border); border-radius: 14px;
}
.scroll-hint::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--accent); border-radius: 2px; animation: wheel 1.6s infinite;
}
@keyframes wheel { to { transform: translateY(12px); opacity: 0; } }

/* ---------- SECTION TITLES ---------- */
.section-title {
  font-family: var(--font-head); font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 44px;
  display: flex; align-items: center; gap: 14px;
}
.section-title span { color: var(--accent); font-size: .65em; }
.section-title::after { content: ""; flex: 1; max-width: 260px; height: 1px; background: var(--border); }
.section-title.center { justify-content: center; }
.section-title.center::after { display: none; }
.center { text-align: center; margin-inline: auto; }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 16px; font-size: 1.05rem; }
.stats { display: grid; gap: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; display: flex; align-items: baseline; gap: 14px;
}
.stat strong { font-family: var(--font-head); font-size: 2.2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); }

/* ---------- SKILLS ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.skill-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: border-color .25s, transform .25s;
}
.skill-card:hover { border-color: rgba(124, 92, 255, .6); transform: translateY(-4px); }
.skill-card h4 { font-family: var(--font-head); margin-bottom: 14px; font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .82rem; padding: 5px 12px; border-radius: 999px;
  background: rgba(124, 92, 255, .1); border: 1px solid rgba(124, 92, 255, .25); color: #cfc6ff;
}

/* ---------- PROJECTS ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.project {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .3s, border-color .3s, box-shadow .3s;
}
.project:hover { transform: translateY(-6px); border-color: rgba(124, 92, 255, .6); box-shadow: 0 20px 50px -20px rgba(124, 92, 255, .45); }
.project-thumb {
  aspect-ratio: 16 / 9; background-size: cover; background-position: center;
  display: grid; place-items: center; font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: rgba(255,255,255,.9);
}
.project-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-body h4 { font-family: var(--font-head); font-size: 1.2rem; }
.project-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.project-links { display: flex; gap: 16px; margin-top: 4px; }
.project-links a { font-size: .9rem; font-weight: 600; color: var(--accent-2); display: inline-flex; gap: 6px; align-items: center; }
.project-links a:hover { text-decoration: underline; }
.project-links svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- DESIGNS ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: .9rem; transition: .2s;
}
.filter:hover { color: var(--text); }
.filter.active { background: var(--grad); color: #fff; border-color: transparent; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.design {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background-size: cover; background-position: center; border: 1px solid var(--border);
  transition: opacity .35s, transform .35s;
}
.design.hide, .design-card.hide { display: none; }
.gallery:has(.design-card) { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.design .placeholder-mark {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 3rem; font-weight: 700; color: rgba(255,255,255,.25);
}
.design-info {
  position: absolute; inset: auto 0 0 0; padding: 18px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  transform: translateY(40%); opacity: 0; transition: .3s;
}
.design:hover .design-info, .design:focus-within .design-info { transform: none; opacity: 1; }
.design-info h4 { font-family: var(--font-head); }
.design-info span { font-size: .8rem; color: var(--accent-2); }

/* ---------- TIMELINE ---------- */
.timeline { list-style: none; position: relative; padding-left: 32px; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; margin-bottom: 34px; }
.timeline li::before {
  content: ""; position: absolute; left: -32px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.timeline .when { color: var(--accent-2); font-size: .85rem; font-weight: 600; }
.timeline h4 { font-family: var(--font-head); font-size: 1.15rem; margin: 2px 0; }
.timeline .place { color: var(--text); opacity: .8; font-size: .95rem; }
.timeline p { color: var(--muted); margin-top: 6px; }

.section-title em { font-style: normal; }
.timeline p:empty { display: none; }
.sub-title { font-family: var(--font-head); font-size: 1.3rem; margin: 20px 0 18px; }
.certs { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.certs li {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; color: var(--muted); font-size: .92rem;
}

/* ---------- CONTACT ---------- */
.contact-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: clamp(28px, 6vw, 60px);
  max-width: 760px;
}
.contact-form { display: grid; gap: 14px; margin: 32px 0 28px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; color: var(--text); font: inherit; resize: vertical; transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { justify-self: start; }
.form-note { font-size: .8rem; color: var(--muted); }
#footerSocials { justify-content: center; }

.footer { text-align: center; padding: 30px 16px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); }

/* ---------- REVEAL ANIMATION ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .hero-inner, .about-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .photo-ring { width: min(220px, 60vw); }
  .photo { font-size: 3.4rem; }
  .menu-btn { display: block; z-index: 60; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(280px, 80vw); flex-direction: column; justify-content: center;
    background: var(--bg-2); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .35s;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.1rem; }
  section { padding: 80px 0; }
  .scroll-hint { display: none; }
}
@media (max-width: 560px) {
  .contact-form .row { grid-template-columns: 1fr; }
  .contact-form .btn { justify-self: stretch; }
  .hero-actions .btn { flex: 1; }
}
