/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: #0a0f1a;
  color: #e8e4dc;
  overflow-x: hidden;
}

:root {
  --navy: #0a0f1a;
  --navy2: #111827;
  --red: #c0392b;
  --red-light: #e74c3c;
  --gold: #c9a84c;
  --gold-light: #e8c56e;
  --cream: #e8e4dc;
  --muted: #8a8478;
  --border: rgba(201,168,76,0.18);
  --card: rgba(255,255,255,0.04);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* ============ NAV ============ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 52px;
  background: rgba(10,15,26,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 1px;
  text-decoration: none;
}

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ============ HERO ============ */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 80px 24px 60px;
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(192,57,43,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(201,168,76,0.08) 0%, transparent 60%),
    linear-gradient(160deg, #0a0f1a 0%, #111827 100%);
}

.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  animation: fadeDown 0.8s 0.1s ease both;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--cream);
  animation: fadeDown 0.8s 0.2s ease both;
}

.hero-name span { color: var(--gold); }

.hero-tagline {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.7;
  font-weight: 300;
  animation: fadeDown 0.8s 0.35s ease both;
}

/* Visitor counter */
.visitor-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(201,168,76,0.08);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 22px;
  margin-top: 36px;
  font-size: 0.82rem;
  color: var(--gold);
  animation: fadeDown 0.8s 0.5s ease both;
}
.visitor-badge .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(201,168,76,0.4); }
  50% { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(201,168,76,0); }
}

.visitor-count { font-weight: 700; font-size: 1rem; color: var(--gold-light); }

.hero-scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted); font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase;
  animation: fadeDown 0.8s 0.7s ease both;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* ============ SECTIONS COMMON ============ */
section {
  padding: 100px 0;
  position: relative;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 32px; }

.section-header {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 56px;
}
.section-number {
  font-family: 'Playfair Display', serif;
  font-size: 4rem; font-weight: 900;
  color: rgba(201,168,76,0.1);
  line-height: 1;
  letter-spacing: -2px;
}
.section-title-wrap {}
.section-eyebrow {
  font-size: 0.65rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--red-light); margin-bottom: 4px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; font-weight: 700;
  color: var(--cream);
}
.section-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ============ ABOUT ============ */
#about { background: var(--navy2); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: center;
}

.about-photo-wrap {
  position: relative;
}
.about-photo-frame {
  position: relative;
  display: inline-block;
}
.about-photo-frame::before {
  content: '';
  position: absolute;
  top: -12px; left: -12px; right: 12px; bottom: 12px;
  border: 1px solid var(--gold);
  opacity: 0.4;
  z-index: 0;
}
.about-photo-frame::after {
  content: '';
  position: absolute;
  top: 12px; left: 12px; right: -12px; bottom: -12px;
  border: 1px solid var(--red);
  opacity: 0.25;
  z-index: 0;
}
.about-photo {
  width: 100%;
  max-width: 280px;
  display: block;
  position: relative; z-index: 1;
  filter: grayscale(15%) contrast(1.05);
}

.about-text {}
.about-greeting {
  font-size: 0.7rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.about-bio {
  font-size: 1rem; line-height: 1.8; color: rgba(232,228,220,0.75);
  margin-bottom: 28px; font-weight: 300;
}
.about-bio strong { color: var(--cream); font-weight: 600; }

.social-links { display: flex; gap: 14px; }
.social-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  position: relative; overflow: hidden;
}
.social-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s; z-index: 0;
}
.social-btn:hover::before { transform: scaleX(1); }
.social-btn:hover { color: var(--navy); border-color: var(--gold); }
.social-btn span, .social-btn svg { position: relative; z-index: 1; }

/* ============ EDUCATION ============ */
#education { background: var(--navy); }

.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.edu-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,168,76,0.4);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.edu-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, var(--gold), var(--red));
}
.edu-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 8px; margin-bottom: 6px;
}
.edu-institution {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 700; color: var(--cream);
}
.edu-date {
  font-size: 0.75rem; color: var(--gold); font-weight: 500;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 4px 12px;
  white-space: nowrap;
}
.edu-degree {
  font-size: 0.82rem; color: var(--red-light); font-weight: 500;
  letter-spacing: 0.3px; margin-bottom: 18px;
}
.edu-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.edu-items li {
  font-size: 0.855rem; color: rgba(232,228,220,0.65);
  line-height: 1.6; padding-left: 18px; position: relative;
}
.edu-items li::before {
  content: '◆'; position: absolute; left: 0;
  font-size: 0.4rem; top: 6px; color: var(--gold);
}
.edu-items li strong { color: var(--cream); font-weight: 600; }

.award-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(192,57,43,0.1);
  border: 1px solid rgba(192,57,43,0.25);
  padding: 8px 16px;
  margin-top: 14px;
  font-size: 0.78rem; color: #e07060; font-weight: 500;
}

/* ============ PROJECTS ============ */
#projects { background: var(--navy2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px;
  position: relative; overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: default;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201,168,76,0.35);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.project-card::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 32px 32px 0;
  border-color: transparent var(--gold) transparent transparent;
  opacity: 0.3;
  transition: opacity 0.2s;
}
.project-card:hover::after { opacity: 0.7; }

.project-tag {
  font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--red-light); margin-bottom: 10px;
}
.project-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; color: var(--cream);
  margin-bottom: 10px; line-height: 1.3;
}
.project-desc {
  font-size: 0.82rem; color: rgba(232,228,220,0.55);
  line-height: 1.65; margin-bottom: 18px; font-weight: 300;
}
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-pill {
  font-size: 0.68rem; letter-spacing: 1px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--gold);
  padding: 3px 10px;
}
.add-project {
  border-style: dashed !important;
  border-color: rgba(255,255,255,0.08) !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 200px; color: var(--muted);
  cursor: pointer; background: transparent !important;
}
.add-project:hover { border-color: rgba(201,168,76,0.25) !important; color: var(--gold) !important; }
.add-project svg { opacity: 0.4; transition: opacity 0.2s; }
.add-project:hover svg { opacity: 0.8; }
.add-project span { font-size: 0.78rem; letter-spacing: 1px; }

/* ============ CERTIFICATIONS ============ */
#certifications { background: var(--navy); }

.certs-list { display: flex; flex-direction: column; gap: 16px; }
.cert-row {
  display: flex; align-items: center; gap: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 24px 32px;
  transition: border-color 0.2s, transform 0.2s;
}
.cert-row:hover {
  border-color: rgba(201,168,76,0.4);
  transform: translateX(6px);
}
.cert-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1.1rem;
}
.cert-info { flex: 1; }
.cert-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 700; color: var(--cream);
  margin-bottom: 3px;
}
.cert-org { font-size: 0.78rem; color: var(--muted); }
.cert-badge {
  font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase;
  padding: 5px 14px;
  font-weight: 600;
}
.cert-badge.earned {
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
}
.cert-badge.progress {
  background: rgba(192,57,43,0.1);
  border: 1px solid rgba(192,57,43,0.25);
  color: var(--red-light);
}

/* ============ FOOTER ============ */
footer {
  background: #060a12;
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
  text-align: center;
}
.footer-name {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 900;
  color: var(--cream); margin-bottom: 4px;
}
.footer-title {
  font-size: 0.7rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 32px;
}
.footer-socials { display: flex; justify-content: center; gap: 16px; margin-bottom: 40px; }
.footer-social {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 28px;
  border: 1px solid var(--border);
  color: var(--cream); text-decoration: none;
  font-size: 0.82rem; font-weight: 500;
  transition: all 0.2s;
}
.footer-social:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
  color: var(--gold);
}
.footer-divider {
  width: 40px; height: 1px;
  background: var(--border);
  margin: 0 auto 20px;
}
.footer-copy {
  font-size: 0.74rem; color: var(--muted);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 700px) {
  nav { padding: 16px 24px; }
  .nav-links { gap: 18px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-photo { max-width: 200px; margin: 0 auto; }
  .edu-card { padding: 24px; }
  .cert-row { padding: 18px 20px; }
}
