/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0f1e;
  --bg-alt:      #0f1629;
  --surface:     #131d36;
  --border:      #1e2d50;
  --accent:      #64ffda;
  --accent-dim:  rgba(100, 255, 218, 0.12);
  --text:        #ccd6f6;
  --text-muted:  #8892b0;
  --white:       #e6f1ff;
  --font-sans:   'Inter', system-ui, sans-serif;
  --font-mono:   'Fira Code', monospace;
  --nav-h:       72px;
  --max-w:       1100px;
  --radius:      8px;
  --radius-lg:   14px;
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  font-weight: 700;
  z-index: 999;
  border-radius: 0 0 var(--radius) 0;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }

/* ── CONTAINER ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAVIGATION ── */
.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color var(--transition);
  counter-increment: nav-item;
}
.nav-link:hover { color: var(--accent); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 2px solid var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 10px 18px;
}
.btn-outline:hover {
  background: var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg { padding: 16px 40px; font-size: 1rem; }

/* ── SECTIONS ── */
.section {
  padding: 100px 0;
}
.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--border);
  flex: 1;
  max-width: 300px;
}
.section-title.centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.section-title.centered::after { display: none; }

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: -24px;
  margin-bottom: 48px;
}

.accent { color: var(--accent); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: var(--nav-h);
}

.hero-inner {
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

.hero-tagline {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.6s forwards;
}

.hero-desc {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.8s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 1s forwards;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
}
.scroll-line {
  display: block;
  width: 2px;
  height: 56px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── ABOUT ── */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.tech-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  list-style: none;
  margin-top: 24px;
}
.tech-list li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}
.tech-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.about-photo { display: flex; justify-content: center; }

.photo-frame {
  position: relative;
  width: 240px;
  height: 240px;
}
.photo-frame::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  right: -16px;
  bottom: -16px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  transition: transform var(--transition);
  z-index: 0;
}
.photo-frame:hover::after { transform: translate(-4px, -4px); }

.photo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.photo-initials {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(100, 255, 218, 0.08);
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.skill-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.skill-card ul {
  list-style: none;
}
.skill-card li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.skill-card li:last-child { border-bottom: none; }

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(100, 255, 218, 0.08);
}

.project-card.featured {
  border-color: rgba(100, 255, 218, 0.3);
  background: linear-gradient(135deg, var(--surface), rgba(100, 255, 218, 0.03));
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.project-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.icon-link {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  display: flex;
}
.icon-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.project-desc {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-top: 4px;
}
.project-tech li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ── CONTACT ── */
.contact-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.contact-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 40px;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition), transform var(--transition);
}
.social-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── FOOTER ── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}
.footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.footer-small {
  font-size: 0.78rem !important;
  margin-top: 4px;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%       { opacity: 0.4; transform: scaleY(0.7); }
}

/* ── REVEAL ON SCROLL ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-inner {
    grid-template-columns: 1fr;
  }
  .about-photo { order: -1; }
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    background: var(--bg);
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }
  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }
  .nav-link { font-size: 1.2rem; }

  .nav-hamburger { display: flex; z-index: 10; }

  .section { padding: 72px 0; }

  .hero-actions { flex-direction: column; align-items: flex-start; }

  .section-title::after { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .project-card { padding: 20px; }
  .skill-card { padding: 24px 20px; }
  .tech-list { grid-template-columns: 1fr; }
}
