@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=Syne:wght@600;700;800&display=swap');

/* ===== CURSOR ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; cursor: none !important; }
html { scroll-behavior: smooth; font-size: 16px; }

#cur-pointer {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 99999;
  will-change: transform;
}
#cur-pointer svg {
  display: block;
  filter: drop-shadow(0 0 5px rgba(57,211,83,0.5));
  transition: transform 0.12s ease;
}

#cur-dot {
  position: fixed; top: 0; left: 0;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none; z-index: 99998;
  will-change: transform;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, opacity 0.15s;
  box-shadow: 0 0 6px rgba(57,211,83,0.7);
}

/* Hover over links: pointer scales up */
body.cur-link #cur-pointer svg { transform: scale(1.2); }
body.cur-link #cur-dot { width: 7px; height: 7px; }

/* Click: compress then release */
body.cur-click #cur-pointer svg { transform: scale(0.88); }
body.cur-click #cur-dot { width: 10px; height: 10px; opacity: 0.5; }

@media (hover: none) and (pointer: coarse) {
  #cur-pointer, #cur-dot { display: none; }
  *, *::before, *::after { cursor: auto !important; }
}


/* ===== TOKENS ===== */
:root {
  --bg:        #0d0d0d;
  --bg2:       #111111;
  --bg3:       #161616;
  --bg4:       #1c1c1c;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --text:      #f0f0f0;
  --muted:     #888;
  --muted2:    #555;
  --accent:    #39d353;
  --accent2:   #2dab42;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h:     68px;
  --radius:    12px;
  --radius-lg: 20px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ===== PARTICLES CANVAS — full page fixed background ===== */
#particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* All sections sit above the canvas */
.navbar, section, footer {
  position: relative;
  z-index: 1;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transition: opacity 0.5s ease; }
.reveal.visible { opacity: 1; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.navbar.scrolled {
  background: rgba(13,13,13,0.96);
  border-color: var(--border);
}
.nav-wrapper { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 700;
  color: var(--text); transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); }
.logo-bracket { color: var(--accent); }
.nav-menu { display: flex; list-style: none; gap: 2.5rem; align-items: center; }
.nav-link { font-size: 0.875rem; color: var(--muted); transition: color 0.2s; position: relative; }
.nav-link::after { content:''; position:absolute; bottom:-4px; left:0; width:0; height:1px; background:var(--accent); transition:width 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.cta-link {
  background: var(--accent); color: #000 !important;
  padding: 0.45rem 1.1rem; border-radius: 6px;
  font-weight: 500; font-size: 0.85rem;
  transition: background 0.2s !important;
}
.cta-link::after { display: none; }
.cta-link:hover { background: var(--accent2); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(13,13,13,0.98);
  border-bottom: 1px solid var(--border);
  z-index: 99; padding: 1.5rem 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
.mobile-menu ul { list-style: none; }
.mobile-link { display: block; padding: 0.9rem 0; font-size: 1.05rem; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--border); transition: color 0.2s; }
.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: var(--accent); }

/* ===== HERO ===== */
.hero-section {
  min-height: 100svh;
  padding-top: var(--nav-h);
  padding-bottom: 3rem;
  display: flex;
  align-items: center;
  position: relative;
}
/* Subtle static grid — no animation, no filter */
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(57,211,83,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,211,83,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-grid-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 60% 40%, transparent 50%, var(--bg) 100%);
}
/* Static accent orbs — no continuous animation */
.hero-noise { display: none; }

.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
  padding: 6rem 0 4rem; position: relative; z-index: 2;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--accent);
  background: rgba(57,211,83,0.08);
  border: 1px solid rgba(57,211,83,0.2);
  padding: 0.35rem 0.85rem; border-radius: 100px;
  margin-bottom: 1.8rem; letter-spacing: 0.03em;
}
.tag-dot {
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  /* Simple opacity pulse — cheaper than box-shadow animation */
  animation: tag-pulse 2.5s ease-in-out infinite;
}
@keyframes tag-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 6vw, 4.4rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.03em; margin-bottom: 1.5rem;
  word-break: break-word;
  overflow-wrap: break-word;
}
.hero-title em { font-style: italic; color: var(--accent); }
.title-accent { color: var(--accent); }
.hero-desc {
  font-size: 1.05rem; color: var(--muted);
  line-height: 1.75; max-width: 440px;
  margin-bottom: 2.2rem;
  overflow-wrap: break-word;
}

.hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 2.5rem; }

.btn-primary-hero {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: #000;
  font-weight: 600; font-size: 0.9rem;
  padding: 0.75rem 1.5rem; border-radius: 8px;
  overflow: hidden; position: relative;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary-hero:hover { background: var(--accent2); transform: translateY(-2px); }
/* Shine sweep — GPU only (transform), triggers once on hover */
.btn-primary-hero::after {
  content: ''; position: absolute;
  top: -50%; left: -80%; width: 50%; height: 200%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn-primary-hero:hover::after { left: 130%; }

.btn-ghost-hero {
  font-size: 0.9rem; color: var(--muted);
  border: 1px solid var(--border2);
  padding: 0.75rem 1.5rem; border-radius: 8px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.btn-ghost-hero:hover { color: var(--text); background: var(--bg3); }

.hero-stats {
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px; width: fit-content;
}
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Profile */
.hero-right { position: relative; display: flex; justify-content: center; }
.profile-frame { position: relative; width: 340px; max-width: 100%; }
/* Profile card hover */
.profile-card {
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; aspect-ratio: 3/4;
  border: 1px solid var(--border2);
  transition: border-color 0.35s, box-shadow 0.35s;
}
.profile-card:hover {
  border-color: rgba(57,211,83,0.45);
  box-shadow: 0 0 40px rgba(57,211,83,0.12), 0 0 0 1px rgba(57,211,83,0.1);
}
.profile-card img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.profile-card:hover img { transform: scale(1.04); }
.profile-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,0.4) 0%, transparent 50%);
  transition: opacity 0.35s;
}
.profile-card:hover .profile-overlay { opacity: 0.5; }

/* Text cursor on inputs/textareas */
body.cur-text #cur-pointer svg { display: none; }
body.cur-text #cur-dot {
  width: 2px; height: 20px;
  border-radius: 1px;
  animation: text-blink 1s step-end infinite;
}
@keyframes text-blink { 0%,100%{opacity:1} 50%{opacity:0} }

.floating-badge {
  position: absolute; display: flex; align-items: center; gap: 0.4rem;
  background: rgba(18,18,18,0.92);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px; padding: 0.45rem 0.9rem;
  font-size: 0.78rem; font-weight: 500; white-space: nowrap;
}
.badge-top { top: 16px; left: -20px; color: var(--accent); }
.badge-bottom { bottom: 20px; right: -16px; }
.pulse-dot { display: inline-block; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; animation: tag-pulse 2.5s ease-in-out infinite; }

.frame-corner { position: absolute; width: 18px; height: 18px; border-color: var(--accent); border-style: solid; opacity: 0.45; }
.c1 { top: -6px; left: -6px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.c2 { top: -6px; right: -6px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.c3 { bottom: -6px; left: -6px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.c4 { bottom: -6px; right: -6px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

.social-vertical {
  position: absolute; right: -48px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.social-v-link {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  color: var(--muted2); border: 1px solid var(--border); border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
}
.social-v-link:hover { color: var(--accent); border-color: rgba(57,211,83,0.3); }
.social-line { width: 1px; height: 60px; background: var(--border); margin-top: 0.5rem; }

.scroll-down { position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); z-index: 2; }
.scroll-pill { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; color: var(--muted2); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.2s; }
.scroll-pill:hover { color: var(--accent); }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--muted2), transparent); }

/* ===== ABOUT ===== */
.about-section { padding: 7rem 0; background: var(--bg); }

.section-label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 500; margin-bottom: 1.2rem; display: inline-block; }
.section-heading { font-family: var(--font-head); font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 1.5rem; }
.section-heading .accent { color: var(--accent); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; margin-bottom: 4rem; }
.about-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1.2rem; font-size: 0.97rem; }
.btn-outline {
  display: inline-block; margin-top: 0.5rem; font-size: 0.9rem;
  color: var(--text); border: 1px solid var(--border2);
  padding: 0.65rem 1.3rem; border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.about-skills { display: flex; flex-direction: column; gap: 1.5rem; }
.skill-group { padding: 1.2rem 1.4rem; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s; }
.skill-group:hover { border-color: rgba(57,211,83,0.15); }
.skill-group-title { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted2); margin-bottom: 0.75rem; font-weight: 500; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tags span {
  font-size: 0.82rem; color: var(--text);
  background: var(--bg4); border: 1px solid var(--border);
  padding: 0.3rem 0.75rem; border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
}
.skill-tags span:hover { border-color: rgba(57,211,83,0.4); color: var(--accent); }

.features-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.feature-item { display: flex; gap: 1rem; align-items: flex-start; }
.feature-icon-wrap {
  flex-shrink: 0; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(57,211,83,0.07); border: 1px solid rgba(57,211,83,0.14);
  border-radius: 10px; color: var(--accent);
  transition: background 0.2s;
}
.feature-item:hover .feature-icon-wrap { background: rgba(57,211,83,0.13); }
.feature-item h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; }
.feature-item p { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ===== PROJECTS ===== */
.projects-section { padding: 7rem 0; background: var(--bg2); }

.projects-section .container { position: relative; z-index: 1; }

.section-header-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3.5rem; gap: 2rem; }
.section-subtitle { font-size: 0.92rem; color: var(--muted); max-width: 280px; text-align: right; line-height: 1.6; }

.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }

.project-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.project-card:hover {
  border-color: rgba(57,211,83,0.2);
  transform: translateY(-4px);
}

.project-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg4);
}
.project-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(0%);
  transition: opacity 0.35s ease;
  opacity: 0;
  will-change: transform;
}
.project-img-wrap img.loaded {
  opacity: 1;
}
.project-img-wrap img.scrollable {
  transition: opacity 0.35s ease, transform 4.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card:hover .project-img-wrap img.scrollable {
  transform: translateY(var(--scroll-end, -60%));
}

.project-img-overlay {
  position: absolute; inset: 0;
  background: rgba(13,13,13,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s;
}
.project-card:hover .project-img-overlay { opacity: 1; }

.project-view-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: #000;
  font-size: 0.85rem; font-weight: 600;
  padding: 0.6rem 1.2rem; border-radius: 8px;
  transition: background 0.2s;
}
.project-view-btn:hover { background: var(--accent2); }

.project-info { padding: 1.4rem; }
.project-num { font-family: var(--font-head); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.project-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.project-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.55; margin-bottom: 1rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.project-tech span { font-size: 0.73rem; color: var(--muted); background: var(--bg4); border: 1px solid var(--border); padding: 0.2rem 0.55rem; border-radius: 4px; }
.project-links-row { display: flex; align-items: center; gap: 1.2rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.proj-link { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--muted); transition: color 0.2s; }
.proj-link:hover { color: var(--text); }
.accent-link { color: var(--accent) !important; font-weight: 500; }
.accent-link:hover { color: var(--accent2) !important; }

/* ===== CONTACT ===== */
.contact-section { padding: 7rem 0; background: var(--bg); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 5rem; align-items: start; }
.contact-desc { color: var(--muted); font-size: 0.97rem; line-height: 1.75; margin-bottom: 2.5rem; }
.contact-info-list { display: flex; flex-direction: column; gap: 1rem; }
.contact-info-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.contact-info-item:hover { border-color: rgba(57,211,83,0.2); transform: translateX(4px); }
.ci-icon { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(57,211,83,0.07); border-radius: 8px; color: var(--accent); }
.ci-label { display: block; font-size: 0.72rem; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.ci-value { display: block; font-size: 0.9rem; }

.contact-form {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { margin-bottom: 1.2rem; }
.form-field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.form-field input,
.form-field textarea {
  width: 100%; padding: 0.75rem 1rem;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 8px; color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem; outline: none;
  transition: border-color 0.2s;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent); }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted2); }
.form-field textarea { resize: vertical; }

.btn-submit-new {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  background: var(--accent); color: #000;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  padding: 0.85rem; border: none; border-radius: 8px;
  overflow: hidden; position: relative;
  transition: background 0.2s, transform 0.2s; margin-bottom: 1rem;
}
.btn-submit-new:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-submit-new::after {
  content: ''; position: absolute;
  top: -50%; left: -80%; width: 50%; height: 200%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg); transition: left 0.5s ease;
}
.btn-submit-new:hover::after { left: 130%; }
.form-note { text-align: center; font-size: 0.78rem; color: var(--muted2); }

/* ===== FOOTER ===== */
.footer { padding: 2rem 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-logo { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; transition: color 0.2s; }
.footer-logo:hover { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: var(--muted2); }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a { color: var(--muted2); transition: color 0.2s; }
.footer-socials a:hover { color: var(--accent); }

/* ===== RESPONSIVE ===== */

/* --- Tablet landscape / small desktop --- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
    padding: 4rem 0 3rem;
  }
  .hero-left { order: 2; }
  .hero-right { order: 1; justify-content: center; }
  .hero-tag  { margin: 0 auto 1.5rem; }
  .hero-desc { margin: 0 auto 2rem; max-width: 520px; }
  .hero-actions { justify-content: center; }
  .hero-stats   { justify-content: center; margin: 0 auto; }
  .social-vertical { display: none; }
  .profile-frame { width: 300px; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .features-row { grid-template-columns: repeat(2,1fr); gap: 1.2rem; }

  .projects-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* --- Tablet portrait --- */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  .container { padding: 0 1.4rem; }

  .nav-menu   { display: none; }
  .hamburger  { display: flex; }

  /* Hero */
  .hero-section { min-height: auto; padding-bottom: 4rem; align-items: flex-start; padding-top: calc(var(--nav-h) + 1rem); }
  .hero-inner   { padding: 2rem 0 1.5rem; gap: 2rem; }
  .hero-title { line-height: 1.12; }
  .hero-desc  { font-size: 0.95rem; max-width: 100%; }
  .hero-stats   {
    gap: 1.2rem;
    padding: 0.8rem 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .stat-num   { font-size: 1.3rem; }
  .profile-frame { width: 260px; }

  /* Sections padding */
  .about-section,
  .projects-section,
  .contact-section { padding: 5rem 0; }

  /* About */
  .features-row { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .feature-item { flex-direction: column; gap: 0.6rem; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
  }
  .section-subtitle { text-align: left; max-width: 100%; font-size: 0.88rem; }

  /* Contact */
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.5rem; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; gap: 0.8rem; }
}

/* --- Mobile --- */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }

  .hero-inner { padding: 1.5rem 0 1.5rem; gap: 1.8rem; }
  .hero-desc  { font-size: 0.9rem; max-width: 100%; }
  .hero-actions { flex-direction: column; align-items: center; width: 100%; }
  .btn-primary-hero,
  .btn-ghost-hero   { width: 100%; justify-content: center; }
  .hero-stats       { gap: 1rem; padding: 0.7rem 1rem; }
  .stat-divider     { height: 28px; }
  .profile-frame    { width: 220px; }

  .about-section,
  .projects-section,
  .contact-section  { padding: 4rem 0; }

  .section-heading  { font-size: clamp(1.7rem, 6vw, 2.2rem); }

  .features-row     { grid-template-columns: 1fr; gap: 0.9rem; }
  .feature-item     { flex-direction: row; gap: 0.9rem; }

  .about-skills     { gap: 1rem; }

  .project-img-wrap { height: 190px; }

  .contact-form     { padding: 1.2rem; }
  .form-field input,
  .form-field textarea { font-size: 16px; } /* prevent iOS zoom */

  .footer-socials   { justify-content: center; }

  .scroll-down      { display: none; }
}

/* --- Very small screens --- */
@media (max-width: 360px) {
  .hero-stats { display: none; }
  .profile-frame { width: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}




