/* ==========================================================================
   Danielle Guerzon — Portfolio
   ========================================================================== */

:root {
  --bg: #090c14;
  --bg-alt: #0d111c;
  --surface: rgba(255,255,255,0.035);
  --surface-strong: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.09);
  --text: #eef1f7;
  --text-dim: #93a0b8;
  --text-dimmer: #5c6884;
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --accent-3: #8b5cf6;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --grad-soft: linear-gradient(120deg, rgba(59,130,246,0.15), rgba(6,182,212,0.15));
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  --radius: 18px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-alt: #ffffff;
  --surface: rgba(10,14,23,0.03);
  --surface-strong: rgba(10,14,23,0.05);
  --border: rgba(10,14,23,0.09);
  --text: #10131c;
  --text-dim: #4b5468;
  --text-dimmer: #8a93a8;
  --shadow: 0 20px 60px -25px rgba(20,30,60,0.25);
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Scroll progress + cursor glow ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 999; transition: width 0.1s ease-out;
}

.cursor-glow {
  position: fixed;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  will-change: transform;
}
@media (max-width: 768px) { .cursor-glow { display: none; } }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 14px; letter-spacing: 0.5px;
}
.logo-text { font-family: var(--font-head); font-size: 15.5px; }
@media (max-width: 560px) { .logo-text { display: none; } }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-size: 14.5px; color: var(--text-dim); font-weight: 500;
  position: relative; padding: 4px 0; transition: color 0.25s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad); transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; display: grid; place-items: center;
  transition: transform 0.3s ease, background 0.3s ease;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.06); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s ease; }
.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); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; top: 68px; left: 16px; right: 16px;
    background: var(--bg-alt); border: 1px solid var(--border); border-radius: 16px;
    flex-direction: column; gap: 4px; padding: 14px;
    transform: translateY(-12px) scale(0.98); opacity: 0; pointer-events: none;
    transition: all 0.3s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 10px 8px; border-radius: 8px; }
  .nav-links a:hover { background: var(--surface); }
  .hamburger { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: all 0.3s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -8px rgba(59,130,246,0.5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(59,130,246,0.6); }
.btn-primary .arrow { transition: transform 0.3s ease; display: inline-block; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-outline { border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface); border-color: var(--accent); }
.btn-ghost { color: var(--text-dim); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent-2); background: var(--surface); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.mesh {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}
.mesh-1 { width: 480px; height: 480px; background: var(--accent); top: -120px; left: -100px; }
.mesh-2 { width: 420px; height: 420px; background: var(--accent-3); bottom: -140px; right: -80px; animation-delay: -6s; }
.mesh-3 { width: 320px; height: 320px; background: var(--accent-2); top: 40%; right: 20%; animation-delay: -12s; }
[data-theme="light"] .mesh { opacity: 0.28; }
@keyframes drift {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(40px,-30px) scale(1.15); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 0%, transparent 80%);
  opacity: 0.5;
}

.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 28px; width: 100%;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
  position: relative; z-index: 2;
}
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; text-align: center; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--accent-2);
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); margin-bottom: 22px;
}
.dot-pulse { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 22px;
}
.typed-wrap { display: inline-block; }
.typed { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.caret { color: var(--accent-2); animation: blink 1s step-end infinite; font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }

.hero-sub { font-size: 17px; color: var(--text-dim); max-width: 540px; margin-bottom: 34px; }
@media (max-width: 900px) { .hero-sub { margin-left: auto; margin-right: auto; } }

.hero-cta { display: flex; gap: 14px; margin-bottom: 34px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero-cta { justify-content: center; } }

.hero-socials { display: flex; gap: 12px; }
@media (max-width: 900px) { .hero-socials { justify-content: center; } }
.social-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; background: var(--surface); color: var(--text-dim);
  transition: all 0.3s ease;
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-3px); }

/* ---------- Hero visual / orbit ---------- */
.hero-visual { display: flex; justify-content: center; }
.orbit-wrap { position: relative; width: 340px; height: 340px; }
@media (max-width: 900px) { .orbit-wrap { width: 280px; height: 280px; margin-top: 20px; } }

.orbit-ring { position: absolute; border: 1px dashed var(--border); border-radius: 50%; inset: 0; }
.ring-1 { animation: spin 40s linear infinite; }
.ring-2 { inset: 34px; animation: spin 30s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.avatar-core {
  position: absolute; inset: 78px; border-radius: 50%;
  background: linear-gradient(160deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: 0 0 60px -10px rgba(59,130,246,0.45), inset 0 0 40px rgba(59,130,246,0.08);
  animation: float 6s ease-in-out infinite;
}
.avatar-core img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.avatar-core span {
  font-family: var(--font-head); font-size: 44px; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.chip {
  position: absolute; padding: 7px 14px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim);
  box-shadow: var(--shadow); animation: float 5s ease-in-out infinite;
  white-space: nowrap;
}
.chip-1 { top: 0; left: 6%; animation-delay: -0.5s; }
.chip-2 { top: 14%; right: -4%; animation-delay: -1.5s; }
.chip-3 { bottom: 18%; right: -8%; animation-delay: -2.5s; }
.chip-4 { bottom: -2%; left: 18%; animation-delay: -3.5s; }
.chip-5 { top: 46%; left: -10%; animation-delay: -4s; }
@media (max-width: 900px) {
  .chip-5 { left: -4%; }
  .chip-3, .chip-2 { right: -2%; }
}

.scroll-cue {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--border); border-radius: 999px;
  display: flex; justify-content: center; padding-top: 8px; z-index: 2;
}
.scroll-cue span { width: 4px; height: 8px; border-radius: 999px; background: var(--accent-2); animation: scrollcue 1.8s ease infinite; }
@keyframes scrollcue { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-tag {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 12px; font-weight: 500;
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 48px; max-width: 720px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }
.about-copy { color: var(--text-dim); font-size: 16.5px; }
.about-copy strong { color: var(--text); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; transition: transform 0.3s ease, border-color 0.3s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.stat-num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--text); }
.stat-suffix { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--accent-2); }
.stat-card p { color: var(--text-dim); font-size: 13.5px; margin-top: 4px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-3));
  opacity: 0.35;
}
.tl-item { position: relative; margin-bottom: 32px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot {
  position: absolute; left: -30px; top: 8px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--grad); box-shadow: 0 0 0 4px var(--bg-alt), 0 0 16px rgba(59,130,246,0.6);
}
.tl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 30px; transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.tl-card:hover { transform: translateX(6px); border-color: var(--accent); background: var(--surface-strong); }
.tl-period { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-2); font-weight: 500; }
.tl-card h3 { font-size: 20px; margin: 8px 0 4px; }
.tl-company { color: var(--text-dim); font-size: 14.5px; margin-bottom: 16px; }
.tl-sub { color: var(--text-dimmer); }
.tl-card ul { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.tl-card li { position: relative; padding-left: 18px; color: var(--text-dim); font-size: 14.5px; line-height: 1.55; }
.tl-card li::before { content: '▸'; position: absolute; left: 0; color: var(--accent-2); }
.tl-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tl-tags span {
  font-family: var(--font-mono); font-size: 11.5px; padding: 5px 12px; border-radius: 999px;
  background: var(--grad-soft); color: var(--accent-2); border: 1px solid var(--border);
}

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 960px) { .project-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } }

.project-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 26px; overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.project-card:hover .project-glow { opacity: 1; }
.project-glow {
  position: absolute; inset: -40%; background: radial-gradient(circle at 30% 20%, rgba(59,130,246,0.18), transparent 60%);
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.project-icon { font-size: 30px; display: inline-block; margin-bottom: 14px; }
.project-card h3 { font-size: 18px; margin-bottom: 10px; position: relative; z-index: 1; }
.project-card p { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; position: relative; z-index: 1; }
.project-card .tl-tags { position: relative; z-index: 1; }
.project-link {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--accent-2);
}
.project-link .arrow { transition: transform 0.3s ease; display: inline-block; }
.project-link:hover { color: var(--text); }
.project-link:hover .arrow { transform: translateX(4px); }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .skills-grid { grid-template-columns: 1fr; } }
.skill-cat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px;
}
.skill-cat h4 { display: flex; align-items: center; gap: 10px; font-size: 15.5px; margin-bottom: 16px; }
.skill-ico { font-size: 18px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-cloud span {
  font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-dim); background: var(--bg-alt); transition: all 0.25s ease; cursor: default;
}
.tag-cloud span:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-2px) scale(1.03); }

/* ---------- Certifications & Education ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }
@media (max-width: 860px) { .cert-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cert-grid { grid-template-columns: 1fr; } }
.cert-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: transform 0.3s ease, border-color 0.3s ease;
}
.cert-card:hover { transform: translateY(-4px); border-color: var(--accent-2); }
.cert-year {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent-2);
  background: var(--grad-soft); padding: 4px 10px; border-radius: 999px; display: inline-block; margin-bottom: 12px;
}
.cert-card h4 { font-size: 15px; font-weight: 600; line-height: 1.4; }

.edu-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--grad-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px;
}
.edu-icon { font-size: 34px; }
.edu-card h3 { font-size: 17px; margin-bottom: 4px; }
.edu-card p { color: var(--text-dim); font-size: 14px; }

/* ---------- Contact ---------- */
.section-contact { text-align: center; overflow: hidden; }
.section-contact .section-title { margin-left: auto; margin-right: auto; }
.contact-lead { color: var(--text-dim); max-width: 520px; margin: 0 auto 46px; font-size: 16px; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 900px; margin: 0 auto 40px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all 0.3s ease;
}
.contact-card:hover { transform: translateY(-5px); border-color: var(--accent); background: var(--surface-strong); }
.contact-ico { font-size: 26px; margin-bottom: 6px; }
.contact-label { font-size: 12px; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.06em; }
.contact-value { font-size: 14px; font-weight: 600; word-break: break-word; }
.location { color: var(--text-dim); font-size: 14.5px; }

/* ---------- Footer ---------- */
.footer { padding: 30px 0; border-top: 1px solid var(--border); }
.footer-inner { position: relative; text-align: center; }
.footer p { color: var(--text-dimmer); font-size: 13.5px; }
.back-to-top {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text-dim); transition: all 0.3s ease;
}
.back-to-top:hover { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(calc(-50% - 3px)); }
