/* ===== VARIABLES ===== */
:root {
  --bg: #0a0a0f;
  --bg-2: #111118;
  --surface: #16161f;
  --surface-2: #1e1e2a;
  --border: rgba(255,255,255,0.07);
  --accent: #6c63ff;
  --accent-2: #00d4aa;
  --text: #f0f0f5;
  --text-2: #9090a8;
  --text-3: #5a5a72;
  --radius: 16px;
  --radius-sm: 8px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h: 72px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ===== CURSOR ===== */
.cursor, .cursor-dot {
  position: fixed; border-radius: 50%; pointer-events: none;
  z-index: 9999; transform: translate(-50%, -50%);
  transition: transform 0.1s, opacity 0.3s;
}
.cursor {
  width: 36px; height: 36px;
  border: 1.5px solid var(--accent);
  transition: all 0.15s var(--ease);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
}
body.cursor-hover .cursor {
  transform: translate(-50%, -50%) scale(1.6);
  background: rgba(108,99,255,0.1);
}

/* ===== NAV ===== */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
#nav.scrolled { border-color: var(--border); }
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-brand span { color: var(--accent); }
.nav-links {
  display: flex; gap: 2.5rem;
}
.nav-link {
  font-size: 0.875rem; font-weight: 400;
  color: var(--text-2);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: -3px; left: 0; right: 0; height: 1.5px;
  background: var(--accent); transform: scaleX(0);
  transform-origin: left; transition: transform 0.25s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-cta {
  font-size: 0.875rem; font-weight: 500;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: all 0.25s;
}
.nav-cta:hover { border-color: var(--accent); color: var(--text); }
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 0.3rem;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: all 0.3s;
}
.nav-burger.open span:first-child { transform: rotate(45deg) translate(4px, 4px); }
.nav-burger.open span:last-child { transform: rotate(-45deg) translate(4px, -4px); }

/* ===== CONTAINER ===== */
.container {
  width: 100%; max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* ===== SECTION COMMONS ===== */
.section { padding: clamp(4rem, 10vw, 8rem) 0; }
.section-label {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; line-height: 1.15;
  color: var(--text); margin-bottom: 2rem;
  letter-spacing: -0.03em;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent); color: #fff;
  font-size: 0.9rem; font-weight: 500;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: all 0.25s var(--ease);
  box-shadow: 0 4px 20px rgba(108,99,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108,99,255,0.5);
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1.5px solid var(--border);
  color: var(--text-2); font-size: 0.9rem; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.25s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  gap: 3rem;
  padding: calc(var(--nav-h) + 3rem) clamp(1.5rem, 5vw, 4rem) 4rem;
  max-width: 1200px; margin: 0 auto;
  position: relative;
}
.hero-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0.12;
  animation: blobAnim 10s ease-in-out infinite;
}
.blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent), transparent);
  top: -200px; right: -100px;
}
.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent-2), transparent);
  bottom: 0; left: -100px;
  animation-delay: -5s;
}
@keyframes blobAnim {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
}
.hero-content { flex: 1; max-width: 600px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 500;
  color: var(--accent-2);
  background: rgba(0,212,170,0.08);
  border: 1px solid rgba(0,212,170,0.2);
  padding: 0.35rem 0.85rem; border-radius: 100px;
  margin-bottom: 1.5rem;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,170,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(0,212,170,0); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800; line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}
.hero-title .line { display: block; }
.hero-title .accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--text-2); line-height: 1.7;
  margin-bottom: 2.5rem; max-width: 480px;
}
.hero-sub em { color: var(--accent-2); font-style: normal; font-weight: 500; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-socials { display: flex; gap: 1.2rem; }
.hero-socials a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-3); font-size: 1.1rem;
  transition: all 0.25s;
}
.hero-socials a:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-2px);
}

/* Hero Image */
.hero-image { position: relative; flex-shrink: 0; }
.image-frame {
  width: clamp(240px, 30vw, 360px);
  height: clamp(240px, 30vw, 360px);
  border-radius: 40% 60% 55% 45% / 45% 50% 50% 55%;
  overflow: hidden;
  border: 2px solid var(--border);
  animation: morphShape 10s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(108,99,255,0.15);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; }
@keyframes morphShape {
  0%, 100% { border-radius: 40% 60% 55% 45% / 45% 50% 50% 55%; }
  50% { border-radius: 60% 40% 45% 55% / 55% 50% 50% 45%; }
}
.image-badge {
  position: absolute; bottom: -1rem; left: -1.5rem;
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 500; color: var(--text-2);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  white-space: nowrap;
}
.image-badge i { color: #ffd700; font-size: 1rem; }

/* Scroll cue */
.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  color: var(--text-3); font-size: 0.78rem;
  animation: bounce 2.5s ease-in-out infinite;
}
.scroll-cue i { font-size: 1.3rem; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===== ABOUT ===== */
.about { background: var(--bg-2); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-2); line-height: 1.8; margin-bottom: 1rem;
  font-size: 1rem;
}
.about-skills { display: flex; flex-direction: column; gap: 2rem; }
.skills-block h4 {
  font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 0.85rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tags span {
  font-size: 0.8rem; font-weight: 400;
  padding: 0.3rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px; color: var(--text-2);
  transition: all 0.2s;
}
.skill-tags span:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(108,99,255,0.08);
}

/* ===== PROJECTS ===== */
.stats-row {
  display: flex; gap: 2rem; margin-bottom: 3.5rem;
}
.stat {
  display: flex; flex-direction: column;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.stat strong {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 700; color: var(--accent);
  line-height: 1;
}
.stat span { font-size: 0.8rem; color: var(--text-3); margin-top: 0.3rem; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s var(--ease);
}
.project-card:hover {
  border-color: rgba(108,99,255,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.project-img {
  position: relative; overflow: hidden;
  height: 180px;
}
.project-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.project-card:hover .project-img img { transform: scale(1.06); }
.project-overlay-links {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,15,0.75);
  opacity: 0; transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.project-card:hover .project-overlay-links { opacity: 1; }
.project-overlay-links a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 500;
  padding: 0.6rem 1.2rem;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm);
  transition: transform 0.2s;
}
.project-overlay-links a:hover { transform: scale(1.04); }
.project-info { padding: 1.2rem; }
.project-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.7rem; }
.tag {
  font-size: 0.72rem; font-weight: 500;
  padding: 0.2rem 0.6rem;
  background: rgba(108,99,255,0.1);
  color: var(--accent); border-radius: 4px;
  border: 1px solid rgba(108,99,255,0.2);
}
.project-info h3 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.4rem;
}
.project-info p { font-size: 0.85rem; color: var(--text-2); line-height: 1.55; }

/* ===== EDUCATION ===== */
.education { background: var(--bg-2); }
.timeline-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
}
.timeline-col-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 600;
  color: var(--text); margin-bottom: 2rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.timeline-col-title i { color: var(--accent); font-size: 1.2rem; }
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 6px; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline-item {
  position: relative; margin-bottom: 2rem; padding-left: 1rem;
}
.tl-dot {
  position: absolute; left: -1.5rem; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--border);
  transition: all 0.2s;
}
.tl-dot.active {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 12px rgba(108,99,255,0.5);
}
.timeline-item:hover .tl-dot { border-color: var(--accent); }
.tl-date {
  font-size: 0.75rem; color: var(--text-3);
  display: block; margin-bottom: 0.3rem;
}
.tl-content strong {
  display: block; font-size: 0.9rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.2rem;
}
.tl-content p { font-size: 0.82rem; color: var(--text-2); }
.tl-content a { color: var(--accent-2); transition: opacity 0.2s; }
.tl-content a:hover { opacity: 0.8; }

/* ===== CONTACT ===== */
.contact-sub {
  color: var(--text-2); max-width: 480px; margin-bottom: 3rem;
  font-size: 1rem;
}
.contact-grid {
  display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all 0.25s;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}
.contact-card i {
  font-size: 1.3rem; color: var(--accent); flex-shrink: 0;
}
.contact-card span { font-size: 0.75rem; color: var(--text-3); display: block; }
.contact-card strong { font-size: 0.88rem; color: var(--text); font-weight: 500; }
.contact-socials {
  display: flex; gap: 0.8rem; margin-top: 0.5rem;
}
.contact-socials a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-3); font-size: 1.1rem;
  transition: all 0.25s;
}
.contact-socials a:hover { border-color: var(--accent); color: var(--accent); }

/* Contact Form */
.contact-form {
  display: flex; flex-direction: column; gap: 1.2rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.78rem; color: var(--text-3);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
}
.form-group input, .form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
  outline: none; resize: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
}
.form-group input::placeholder, .form-group textarea::placeholder {
  color: var(--text-3);
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 800; color: var(--text);
}
.footer-brand span { color: var(--accent); }
footer p { font-size: 0.82rem; color: var(--text-3); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.82rem; color: var(--text-3); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(20px);
    padding: 2rem; gap: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-burger { display: flex; }
  .hero {
    flex-direction: column; justify-content: center;
    text-align: center; padding-top: calc(var(--nav-h) + 2rem);
    min-height: auto; padding-bottom: 5rem;
  }
  .hero-content { max-width: 100%; }
  .hero-sub { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-image { order: -1; }
  .image-badge { left: 50%; transform: translateX(-50%); }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .timeline-grid { grid-template-columns: 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .projects-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .scroll-cue { display: none; }
}

@media (max-width: 600px) {
  .stats-row { flex-wrap: wrap; gap: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero-title { font-size: clamp(2.8rem, 12vw, 4rem); }
}
