/* ============================================
   ROOT VARIABLES
============================================ */
:root {
  --bg:        #ffffff;
  --surface:   #f7f7f9;
  --border:    #ebebeb;
  --accent:    #5b4ef5;
  --accent2:   #2ec4b6;
  --text:      #1a1a1a;
  --muted:     #888;
  --light:     #e8e5ff;
  --font-head: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Lora', serif;
  --radius:    12px;
  --t:         0.22s ease;
}

/* ============================================
   RESET & BASE
============================================ */
*, *::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.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
section { padding: 100px 0; }

/* ============================================
   NAV
============================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px 40px;
  display: flex; justify-content: space-between; align-items: center;
  transition: all var(--t);
}
nav.scrolled {
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 18px 40px;
}
.nav-logo {
  font-family: var(--font-head); font-weight: 800; font-size: 22px;
  letter-spacing: -1px; color: var(--text);
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: var(--font-head); font-size: 13px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  transition: color var(--t);
}
.nav-links a:hover { color: var(--accent); }

/* ============================================
   HAMBURGER MENU BUTTON
============================================ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 200;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(16px);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-nav a {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  transition: color var(--t);
}
.mobile-nav a:hover { color: var(--accent); }

/* ============================================
   HERO
============================================ */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: 100px; position: relative; overflow: hidden;
}
#hero::before {
  content: ''; position: absolute;
  width: 640px; height: 640px;
  background: radial-gradient(circle, #e8e5ff 0%, rgba(232,229,255,0) 70%);
  right: -80px; top: 50%; transform: translateY(-50%);
  border-radius: 50%; pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center; position: relative; z-index: 1;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 20px;
  opacity: 0; animation: fadeUp 0.55s 0.1s forwards;
}
.hero-tag::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
}
.hero-name {
  font-family: var(--font-head); font-size: clamp(42px, 6vw, 78px);
  font-weight: 800; line-height: 1.0; letter-spacing: -2.5px; color: var(--text);
  opacity: 0; animation: fadeUp 0.55s 0.22s forwards;
}
.hero-name em {
  font-style: italic; font-family: var(--font-body); font-weight: 400;
  color: var(--accent); letter-spacing: -1px; white-space: nowrap;font-size: xx-large;
}
.hero-whoami {
  font-size: 0.38em;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text);
  font-family: var(--font-head);
  display: block;
  margin-bottom: -6px;
  line-height: 1;
  margin-bottom: 5px;
}
.hero-desc {
  margin-top: 28px; font-size: 17px; color: #555; line-height: 1.85;
  max-width: 440px;
  opacity: 0; animation: fadeUp 0.55s 0.34s forwards;
}
.hero-desc strong { color: var(--text); font-weight: 500; }
.hero-desc a {
  color: var(--accent); border-bottom: 1px solid rgba(91,78,245,0.3);
  transition: border-color var(--t);
}
.hero-desc a:hover { border-color: var(--accent); }
.hero-cta {
  display: flex; gap: 14px; margin-top: 44px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.55s 0.46s forwards;
}
.hero-visual {
  display: flex; align-items: center; justify-content: center;
  opacity: 0; animation: fadeIn 0.7s 0.5s forwards;
}
.hero-visual-blob {
  width: 100%; max-width: 420px; aspect-ratio: 1;
  background: var(--light);
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero-code-block {
  font-family: 'Courier New', monospace; font-size: 13px;
  line-height: 1.8; color: var(--text); padding: 32px; text-align: left;
}
.hero-code-block .cp { color: var(--accent); font-weight: 600; }
.hero-code-block .ct { color: var(--accent2); }
.hero-code-block .cg { color: var(--muted); }
.scroll-hint {
  margin-top: 56px; display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-family: var(--font-head);
  font-size: 12px; letter-spacing: 0.08em;
  opacity: 0; animation: fadeUp 0.55s 0.6s forwards;
}
.mouse-icon {
  width: 22px; height: 34px; border: 2px solid #ccc;
  border-radius: 11px; position: relative;
}
.mouse-icon::after {
  content: ''; position: absolute; width: 3px; height: 6px;
  background: var(--accent); border-radius: 2px;
  left: 50%; top: 5px; transform: translateX(-50%);
  animation: scrollWheel 1.6s infinite;
}
@keyframes scrollWheel {
  0%   { opacity: 1; top: 5px; }
  100% { opacity: 0; top: 18px; }
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; font-family: var(--font-head);
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  border-radius: 100px; transition: all var(--t); cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover {
  background: #4438e0; transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91,78,245,0.28);
}
.btn-outline { border: 1.5px solid var(--border); color: var(--muted); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ============================================
   SECTION LABELS
============================================ */
.section-eyebrow {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-head); font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; color: var(--text);
}
.section-title em {
  font-style: italic; font-family: var(--font-body);
  font-weight: 400; color: var(--accent);
}
.section-sub {
  margin-top: 14px; color: var(--muted); font-size: 16px;
  max-width: 520px; line-height: 1.75;
}

/* ============================================
   ABOUT
============================================ */
#about { background: var(--bg); border-top: 1px solid var(--border); }
.about-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 80px; align-items: center;
}
.about-text p { color: #555; line-height: 1.9; margin-bottom: 18px; font-size: 16px; }
.about-text p strong { color: var(--text); font-weight: 500; }
.about-cards { display: flex; flex-direction: column; gap: 16px; }
.about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px; transition: all var(--t);
}
.about-card:hover { border-color: var(--accent); transform: translateX(4px); }
.about-card-num {
  font-family: var(--font-head); font-size: 36px; font-weight: 800;
  color: var(--accent); letter-spacing: -2px; line-height: 1;
}
.about-card-label { font-family: var(--font-head); font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ============================================
   SKILLS
============================================ */
#skills { background: var(--surface); border-top: 1px solid var(--border); }
.skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 56px; }
.skill-cat {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 32px; transition: all var(--t);
}
.skill-cat:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(91,78,245,0.06); }
.skill-cat-label {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block; padding: 5px 12px;
  font-family: var(--font-head); font-size: 12px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; color: #555; transition: all var(--t);
}
.skill-cat:hover .pill { border-color: rgba(91,78,245,0.25); }

/* ============================================
   PROJECTS
============================================ */
#projects { border-top: 1px solid var(--border); }
.proj-category { margin-bottom: 72px; }
.proj-category:last-child { margin-bottom: 0; }
.cat-header {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 28px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cat-title { font-family: var(--font-head); font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.cat-count {
  font-family: var(--font-head); font-size: 12px; color: var(--muted);
  background: var(--surface); padding: 3px 10px;
  border-radius: 100px; border: 1px solid var(--border);
}
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 20px; }
.proj-card {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all var(--t); position: relative;
}
.proj-card::before {
  content: ''; position: absolute;
  top: -1px; left: 24px; right: 24px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 0 0 3px 3px;
  opacity: 0; transition: opacity var(--t);
}
.proj-card:hover {
  border-color: rgba(91,78,245,0.3);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(91,78,245,0.09);
}
.proj-card:hover::before { opacity: 1; }
.proj-card h3 {
  font-family: var(--font-head); font-size: 18px; font-weight: 700;
  letter-spacing: -0.4px; line-height: 1.25; color: var(--text);
}
.proj-card p { font-size: 14px; color: var(--muted); line-height: 1.75; flex: 1; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-tags span {
  font-family: var(--font-head); font-size: 11px; font-weight: 600;
  padding: 3px 9px; background: var(--light); color: var(--accent); border-radius: 100px;
}
.card-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.gh-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-family: var(--font-head); font-size: 12px;
  font-weight: 600; border-radius: 100px; border: 1.5px solid var(--border);
  color: var(--muted); transition: all var(--t);
}
.gh-btn:hover { border-color: var(--text); color: var(--text); background: var(--surface); }
.demo-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-family: var(--font-head); font-size: 12px;
  font-weight: 600; border-radius: 100px;
  border: 1.5px solid rgba(91,78,245,0.3);
  color: var(--accent); background: var(--light); transition: all var(--t);
}
.demo-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================
   LEARNING
============================================ */
#learning { background: var(--surface); border-top: 1px solid var(--border); }
.learn-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
  gap: 16px; margin-top: 56px;
}
.learn-item {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  display: flex; align-items: flex-start; gap: 14px; transition: all var(--t);
}
.learn-item:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(91,78,245,0.07); }
.learn-dot {
  width: 10px; height: 10px; background: var(--accent);
  border-radius: 50%; margin-top: 5px; flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--light);
}
.learn-info h4 { font-family: var(--font-head); font-size: 14px; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 3px; }
.learn-info p { font-family: var(--font-head); font-size: 12px; color: var(--muted); }

/* ============================================
   GITHUB
============================================ */
#github { border-top: 1px solid var(--border); }
.gh-banner {
  background: var(--light); border: 1.5px solid rgba(91,78,245,0.18);
  border-radius: 20px; padding: 72px 56px; text-align: center;
}
.gh-banner h2 { font-family: var(--font-head); font-size: clamp(26px,3.5vw,38px); font-weight: 800; letter-spacing: -1.5px; margin-bottom: 12px; }
.gh-banner p { color: var(--muted); font-size: 16px; margin-bottom: 32px; }

/* ============================================
   CONTACT
============================================ */
#contact { border-top: 1px solid var(--border); }
.contact-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 72px; align-items: start; }
.contact-links { display: flex; flex-direction: column; gap: 14px; }
.c-link {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 22px; border: 1.5px solid var(--border);
  border-radius: var(--radius); transition: all var(--t); background: var(--bg);
}
.c-link:hover { border-color: var(--accent); transform: translateX(5px); box-shadow: 0 4px 16px rgba(91,78,245,0.08); }
.c-icon {
  width: 40px; height: 40px; background: var(--light);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 18px; flex-shrink: 0;
}
.c-info span {
  display: block; font-family: var(--font-head); font-size: 11px;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.c-info strong { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--text); }

/* ============================================
   FOOTER
============================================ */
footer { border-top: 1px solid var(--border); padding: 28px 0; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; }
.foot-copy { font-family: var(--font-head); font-size: 13px; color: var(--muted); }
.foot-copy span { color: var(--accent); font-weight: 600; }
.foot-top { font-family: var(--font-head); font-size: 13px; color: var(--muted); transition: color var(--t); }
.foot-top:hover { color: var(--accent); }

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================
   RESPONSIVE — TABLET LARGE (≤ 1024px)
============================================ */
@media (max-width: 1024px) {
  .hero-inner { gap: 40px; }
  .hero-visual-blob { max-width: 340px; }
  .hero-code-block { font-size: 12px; padding: 24px; }
  .about-grid { gap: 48px; }
}

/* ============================================
   RESPONSIVE — TABLET (≤ 900px)
============================================ */
@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { justify-content: flex-start; }
  .hero-visual-blob { max-width: 360px; }
  #hero::before { width: 400px; height: 400px; right: -100px; }
}

/* ============================================
   RESPONSIVE — TABLET SMALL (≤ 768px)
============================================ */
@media (max-width: 768px) {
  section { padding: 72px 0; }
  nav { padding: 18px 24px; }
  nav.scrolled { padding: 14px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-nav { display: flex; }
  .hero-visual { justify-content: center; order: -1; }
  .hero-visual-blob { max-width: 220px; }
  .hero-inner { grid-template-columns: 1fr; }
  #hero { padding-top: 88px; }
  .proj-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .gh-banner { padding: 52px 40px; }
}

/* ============================================
   RESPONSIVE — MOBILE (≤ 640px)
============================================ */
@media (max-width: 640px) {
  section { padding: 56px 0; }
  .container { padding: 0 20px; }

  /* Nav */
  nav { padding: 16px 20px; }
  nav.scrolled { padding: 14px 20px; }

  /* Hero */
  .hero-visual-blob { max-width: 180px; }
  #hero { padding-top: 80px; min-height: auto; padding-bottom: 48px; }
  #hero::before { width: 300px; height: 300px; right: -80px; top: 10%; }
  .hero-name { font-size: clamp(38px, 11vw, 56px); letter-spacing: -2px; }
  .hero-desc { font-size: 15px; margin-top: 20px; }
  .hero-cta { margin-top: 32px; gap: 10px; }
  .hero-cta .btn { padding: 11px 20px; font-size: 13px; }
  .scroll-hint { margin-top: 36px; }

  /* Section headings */
  .section-title { font-size: clamp(24px, 7vw, 34px); letter-spacing: -1px; }
  .section-sub { font-size: 14px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-card-num { font-size: 28px; }
  .about-cards { flex-direction: row; flex-wrap: wrap; }
  .about-card { flex: 1; min-width: 130px; padding: 18px 20px; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 36px; }
  .skill-cat { padding: 22px 20px; }

  /* Projects */
  .proj-grid { grid-template-columns: 1fr; }
  .cat-title { font-size: 17px; }
  .proj-card { padding: 22px; }
  .proj-card h3 { font-size: 16px; }
  .proj-category { margin-bottom: 48px; }
  .card-btns { flex-wrap: wrap; }

  /* Learning */
  .learn-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 36px;
  }
  .learn-item { padding: 16px 18px; gap: 10px; }
  .learn-info h4 { font-size: 13px; }
  .learn-info p { font-size: 11px; }

  /* GitHub */
  .gh-banner { padding: 40px 24px; border-radius: 14px; }
  .gh-banner h2 { font-size: 22px; letter-spacing: -0.5px; }
  .gh-banner p { font-size: 14px; }
  .gh-banner .btn { font-size: 12px; padding: 11px 18px; }

  /* Contact */
  .contact-wrap { grid-template-columns: 1fr; gap: 32px; }
  .c-link { padding: 16px 18px; gap: 12px; }
  .c-icon { width: 36px; height: 36px; font-size: 16px; }
  .c-info strong { font-size: 13px; }

  /* Footer */
  .foot-inner { flex-direction: column; gap: 10px; text-align: center; }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (≤ 380px)
============================================ */
@media (max-width: 380px) {
  .hero-name { font-size: 34px; }
  .learn-grid { grid-template-columns: 1fr; }
  .about-cards { flex-direction: column; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .mobile-nav a { font-size: 22px; }
}
