/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Colors */
  --bg: #0a0e17;
  --bg-soft: #0d1220;
  --surface: #121828;
  --surface-2: #192134;
  --border: rgba(230, 236, 248, 0.09);
  --border-strong: rgba(230, 236, 248, 0.16);

  --text: #e9edf7;
  --text-dim: #97a2b8;
  --text-faint: #6b7590;

  --accent: #7c6cff; /* violet-blue: primary accent */
  --accent-soft: #7c6cff26;
  --accent-2: #2fd9d2; /* cyan-teal: secondary / AI accent */
  --accent-2-soft: #2fd9d226;

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  /* Layout */
  --container-w: 1120px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --header-h: 72px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. RESET & BASE ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 600;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* ---------- 3. LAYOUT HELPERS ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 128px 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-dim);
  max-width: 46ch;
  margin-bottom: 56px;
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a4de0);
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--accent-soft);
}
.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

/* ---------- 4. NAVIGATION ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10, 14, 23, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 14, 23, 0.85);
}

.navbar {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.nav-logo-dot {
  color: var(--accent-2);
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.94rem;
  color: var(--text-dim);
  border-radius: 999px;
  transition:
    color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle .bar {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s var(--ease);
}
.nav-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 20%, #141d33 0%, var(--bg) 55%);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 23, 0.35) 0%,
    rgba(10, 14, 23, 0.55) 55%,
    var(--bg) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
}

.hero-eyebrow {
  color: var(--accent-2);
  font-weight: 500;
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.hero-name {
  font-size: clamp(2.75rem, 7vw, 5rem);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--text);
  margin-bottom: 22px;
}

.hero-intro {
  max-width: 56ch;
  color: var(--text-dim);
  font-size: 1.08rem;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  animation: scrollDown 1.8s ease-in-out infinite;
}
@keyframes scrollDown {
  0% {
    top: 8px;
    opacity: 1;
  }
  70% {
    top: 22px;
    opacity: 0;
  }
  100% {
    top: 22px;
    opacity: 0;
  }
}

/* ---------- 6. ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: start;
}

.about-text {
  color: var(--text-dim);
  font-size: 1.08rem;
  line-height: 1.8;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.about-card-icon {
  width: 38px;
  height: 38px;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.about-card-icon svg {
  width: 100%;
  height: 100%;
}

.about-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.about-card p {
  color: var(--text-dim);
  font-size: 0.94rem;
}

/* ---------- 7. SKILLS ---------- */
.skills-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.skills-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
}

.skills-group-head {
  margin-bottom: 24px;
}

.skills-status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.status-comfortable {
  background: var(--accent-2-soft);
  color: var(--accent-2);
}
.status-learning {
  background: var(--accent-soft);
  color: var(--accent);
}
.status-future {
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px dashed var(--border-strong);
}

.skills-group h3 {
  font-size: 1.15rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease);
}
.skill-chip:hover {
  transform: translateX(4px);
  background: #202b42;
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-2);
  font-family: var(--font-display);
}

/* ---------- 8. PROJECTS ---------- */
.project-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: all 0.25s var(--ease);
}
.filter-btn:hover {
  color: var(--text);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    opacity 0.3s var(--ease);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
}

.project-card.hide {
  display: none;
}

.project-thumb {
  height: 160px;
  position: relative;
}
.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
.project-thumb-1 {
  background: linear-gradient(135deg, #3a2f7a, #7c6cff);
}
.project-thumb-2 {
  background: linear-gradient(135deg, #1c4f52, #2fd9d2);
}
.project-thumb-3 {
  background: linear-gradient(135deg, #402a63, #2fd9d2);
}

.project-body {
  padding: 26px;
}

.project-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.project-body h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.project-body p {
  color: var(--text-dim);
  font-size: 0.94rem;
  margin-bottom: 18px;
}

.project-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.project-stack span {
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
}

.project-links {
  display: flex;
  gap: 18px;
}
.project-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.project-link:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.project-empty {
  color: var(--text-dim);
  padding: 40px 0;
}

/* ---------- 9. EDUCATION (TIMELINE) ---------- */
.timeline {
  position: relative;
  max-width: 760px;
  padding-left: 32px;
  border-left: 1px solid var(--border-strong);
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px var(--accent-2-soft);
}

.timeline-date {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-content h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.timeline-content > p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.timeline-detail {
  color: var(--text-faint) !important;
  font-size: 0.92rem !important;
  max-width: 58ch;
}

/* ---------- 10. CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row label {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.form-row input,
.form-row textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.25s var(--ease);
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent-2);
}

.contact-form .btn {
  align-self: flex-start;
  margin-top: 6px;
}

.form-status {
  font-size: 0.9rem;
  color: var(--accent-2);
  min-height: 1.2em;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.contact-link:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.contact-link-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-transform: none;
}
.contact-link-value {
  font-weight: 600;
  color: var(--text);
}

/* ---------- 11. FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-name {
  font-weight: 600;
}
.footer-role {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.footer-links {
  display: flex;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-meta {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.footer-terminal {
  font-family: var(--font-mono);
  color: var(--ok);
  margin-top: 2px;
}

/* ---------- 12. RESPONSIVE ---------- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .skills-columns {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 88px 0;
  }
  .container {
    padding: 0 22px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 12px 22px 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.3s var(--ease),
      opacity 0.3s var(--ease);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link {
    display: block;
    padding: 14px 10px;
    border-radius: 8px;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
}
