/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', 'Inter', sans-serif;
  background: #0b1120;
  color: #c5cdd8;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: #00c8ff; text-decoration: none; transition: color .2s; }
a:hover { color: #5de0ff; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: #fff; font-weight: 700; line-height: 1.3; font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.01em; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ── Scroll Animations ── */
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s ease-out, transform .7s ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-left {
  opacity: 0; transform: translateX(-40px);
  transition: opacity .7s ease-out, transform .7s ease-out;
}
.fade-in-left.visible { opacity: 1; transform: translateX(0); }
.fade-in-right {
  opacity: 0; transform: translateX(40px);
  transition: opacity .7s ease-out, transform .7s ease-out;
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: .1s; }
.stagger-children > *:nth-child(3) { transition-delay: .2s; }
.stagger-children > *:nth-child(4) { transition-delay: .3s; }
.stagger-children > *:nth-child(5) { transition-delay: .4s; }
.stagger-children > *:nth-child(6) { transition-delay: .5s; }

/* ── Header / Nav ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,17,32,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 16px 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 36px; }
.logo span { font-size: 1.25rem; font-weight: 700; color: #fff; }
nav ul { display: flex; list-style: none; gap: 32px; }
nav a {
  color: #a0aec0; font-size: .9rem; font-weight: 500;
  letter-spacing: .03em; transition: color .2s;
  position: relative;
}
nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: #00c8ff;
  transition: width .3s ease;
}
nav a:hover::after, nav a.active::after { width: 100%; }
nav a:hover, nav a.active { color: #fff; }

/* Mobile menu */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative; z-index: 101;
}
.hamburger span {
  display: block; width: 100%; height: 2px; background: #fff;
  position: absolute; left: 0; transition: all .3s ease;
  border-radius: 2px;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }
.hamburger.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* ── Hero ── */
.hero {
  padding: 80px 0 60px;
  display: flex; align-items: center; gap: 60px;
}
.hero-text { flex: 1; }
.hero-text .label {
  color: #00c8ff; font-size: .85rem; font-weight: 600;
  letter-spacing: .05em; margin-bottom: 12px;
}
.hero-text h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 2.8rem; margin-bottom: 24px; letter-spacing: -0.02em;
}
.hero-text p { font-size: 1rem; margin-bottom: 16px; max-width: 520px; }
.hero-text p strong { color: #fff; }
.hero-image { flex-shrink: 0; position: relative; }
.hero-image::before {
  content: ''; position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,255,.15) 0%, transparent 70%);
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.hero-image img {
  width: 320px; height: 320px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(0,200,255,.3);
  position: relative; z-index: 1;
}

/* Typing effect */
.typing-cursor::after {
  content: '|'; animation: blink .8s step-end infinite; color: #00c8ff;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  border: 2px solid #00c8ff; border-radius: 50px;
  color: #fff; font-weight: 600; font-size: .9rem;
  letter-spacing: .05em; text-transform: uppercase;
  transition: all .25s;
  background: transparent;
  cursor: pointer;
  position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(0,200,255,.15);
  transition: width .4s ease, height .4s ease;
  transform: translate(-50%, -50%);
}
.btn:hover::before { width: 300px; height: 300px; }
.btn:hover { background: rgba(0,200,255,.12); color: #fff; }
.btn-filled { background: #00c8ff; color: #0b1120; }
.btn-filled:hover { background: #33d4ff; color: #0b1120; }
.btn-filled::before { background: rgba(255,255,255,.15); }
.btn .arrow { font-size: 1.1rem; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ── Section spacing ── */
.section { padding: 80px 0; }
.section-dark { background: #0d1526; }
.section-title {
  text-align: center; font-size: 1.8rem; margin-bottom: 8px;
}
.section-divider {
  width: 60px; height: 3px; background: #00c8ff;
  margin: 0 auto 48px;
}

/* ── About ── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: start;
}
.about-text h2 { font-size: 1.8rem; margin-bottom: 20px; }
.stat-cards { display: flex; gap: 40px; margin-bottom: 24px; }
.stat-card .number {
  font-size: 2.5rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #00c8ff, #0070ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .label { font-size: .85rem; color: #a0aec0; }

/* ── Project Cards (homepage grid) ── */
.projects-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.project-card {
  display: flex; align-items: center; gap: 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 24px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0,200,255,.3);
  box-shadow: 0 12px 40px rgba(0,200,255,.08), 0 4px 12px rgba(0,0,0,.3);
}
.project-card-text { flex: 1; }
.project-card-text h3 { font-size: 1.1rem; margin-bottom: 4px; transition: color .2s; }
.project-card:hover .project-card-text h3 { color: #00c8ff; }
.project-card-text p { font-size: .85rem; color: #8892a4; margin-bottom: 12px; }
.project-card-text .view-link {
  color: #00c8ff; font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.project-card-text .view-link:hover { color: #5de0ff; }
.project-card-image { overflow: hidden; border-radius: 8px; }
.project-card-image img {
  width: 160px; height: 110px; object-fit: cover; border-radius: 8px;
  transition: transform .4s ease;
}
.project-card:hover .project-card-image img { transform: scale(1.08); }

/* ── Projects page (full cards) ── */
.projects-full-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}

/* ── Skills ── */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; }
.skill-item { }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.skill-name { font-weight: 600; color: #fff; font-size: .95rem; }
.skill-pct { color: #00c8ff; font-weight: 600; font-size: .95rem; }
.skill-bar { height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; }
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, #00c8ff, #0090ff);
  border-radius: 4px;
  width: 0; transition: width 1.2s ease-out;
}
.skill-fill.animated { /* width set via inline style */ }

/* ── Contact / Footer ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h2 { font-size: 1.6rem; margin-bottom: 20px; }
.contact-info p { margin-bottom: 16px; }
.contact-info .detail-label { font-weight: 700; color: #fff; margin-bottom: 4px; }
.social-links { display: flex; gap: 16px; margin-top: 20px; }
.social-links a {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.06); display: flex;
  align-items: center; justify-content: center;
  color: #c5cdd8; font-size: 1.1rem;
  transition: all .3s ease;
}
.social-links a:hover {
  background: #00c8ff; color: #0b1120;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,200,255,.3);
}
.contact-form h2 { font-size: 1.6rem; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; color: #fff; margin-bottom: 6px; font-size: .9rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: #fff; font-size: .95rem;
  font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #5a6577; }
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: #00c8ff;
  box-shadow: 0 0 0 3px rgba(0,200,255,.1);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* Form success state */
.form-success {
  text-align: center; padding: 40px 20px;
  animation: fadeInScale .4s ease-out;
}
.form-success .checkmark { font-size: 3rem; margin-bottom: 16px; }
.form-success h3 { margin-bottom: 8px; }
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

.site-footer {
  background: #070d1a;
  text-align: center; padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .85rem; color: #5a6577;
}

/* ── Page Header (Projects, Resume, Project Detail) ── */
.page-header { padding: 60px 0 40px; }
.page-header h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 2.4rem; margin-bottom: 12px; letter-spacing: -0.02em;
}
.page-header-divider { width: 60px; height: 3px; background: #00c8ff; }

/* ── Project Detail ── */
.project-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 48px;
}
.project-gallery img {
  border-radius: 8px; width: 100%; height: auto;
  cursor: pointer; transition: transform .3s ease;
}
.project-gallery img:hover { transform: scale(1.03); }
.project-gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }

.project-meta { display: flex; gap: 60px; margin-bottom: 40px; }
.project-meta-item h3 { font-size: 1rem; margin-bottom: 8px; }
.project-meta-item p { font-size: .9rem; color: #8892a4; }

.project-section { margin-bottom: 40px; }
.project-section h2 { font-size: 1.3rem; margin-bottom: 16px; }
.project-section p { margin-bottom: 12px; }
.project-section ul { padding-left: 20px; margin-bottom: 12px; }
.project-section li { margin-bottom: 4px; color: #c5cdd8; }
.project-section li::marker { color: #00c8ff; }

/* ── Image Lightbox ── */
.lightbox-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.9); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  max-width: 90%; max-height: 90vh; border-radius: 8px;
  transform: scale(.9); transition: transform .3s ease;
}
.lightbox-overlay.active img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 24px; right: 24px;
  background: none; border: none; color: #fff;
  font-size: 2rem; cursor: pointer; opacity: .7;
  transition: opacity .2s;
}
.lightbox-close:hover { opacity: 1; }

/* ── Resume ── */
.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.resume-column h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.1rem; margin-bottom: 24px; color: #fff;
}
.resume-column h3 .icon { font-size: 1.2rem; }
.resume-item {
  border-left: 3px solid rgba(0,200,255,.3);
  padding-left: 20px; margin-bottom: 28px;
  transition: border-color .3s;
}
.resume-item:hover { border-left-color: #00c8ff; }
.resume-item h4 { font-size: 1rem; margin-bottom: 4px; }
.resume-item .subtitle { color: #8892a4; font-size: .9rem; }
.resume-item .company { font-weight: 700; color: #fff; font-size: 1rem; margin-bottom: 4px; }
.resume-item .role { color: #a0aec0; font-size: .9rem; margin-bottom: 4px; }
.resume-item .desc { font-size: .85rem; color: #8892a4; }

/* ── Back to Top ── */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #00c8ff; color: #0b1120;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; z-index: 99;
  opacity: 0; transform: translateY(20px);
  transition: opacity .3s, transform .3s, background .2s;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: #33d4ff;
  transform: translateY(-3px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { flex-direction: column; text-align: center; padding: 48px 0 32px; gap: 32px; }
  .hero-text p { max-width: 100%; }
  .hero-image img { width: 240px; height: 240px; }
  .hero-text h1 { font-size: 2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .stat-cards { justify-content: center; }
  .projects-grid, .projects-full-grid { grid-template-columns: 1fr; }
  .project-card { flex-direction: column; text-align: center; }
  .project-card-image img { width: 100%; height: auto; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .resume-grid { grid-template-columns: 1fr; }
  .project-gallery { grid-template-columns: 1fr 1fr; }
  nav ul { display: none; }
  .hamburger { display: block; }
  nav.open ul {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(11,17,32,.98); padding: 20px 24px; gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(12px);
    animation: slideDown .3s ease-out;
  }
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .back-to-top { bottom: 20px; right: 20px; width: 38px; height: 38px; font-size: 1rem; }
}
