/* ── CSS VARIABLES ── */
:root {
  --bg: #f5f7ff;
  --surface: #eceffe;
  --card: #ffffff;
  --border: #d0d5f0;
  --accent: #4f46e5;
  --accent-light: #ede9fe;
  --accent2: #f43f5e;
  --text: #1a1a2e;
  --muted: #6366a8;
  --nav-h: 72px;
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --surface: #12121a;
  --card: #1a1a26;
  --border: #2a2a3d;
  --accent: #c8ff00;
  --accent-light: rgba(200,255,0,0.1);
  --accent2: #ff6b6b;
  --text: #e8e8f0;
  --muted: #7070a0;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(245,247,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}

[data-theme="dark"] nav { background: rgba(10,10,15,0.88); }

/* ── THEME TOGGLE ── */
.nav-right { display: flex; align-items: center; gap: 2rem; }

.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 64px;
  height: 34px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #73C0FC;
  transition: .4s;
  border-radius: 30px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 30px;
  width: 30px;
  border-radius: 20px;
  left: 2px;
  bottom: 2px;
  z-index: 2;
  background-color: #e8e8e8;
  transition: .4s;
}
.sun svg {
  position: absolute;
  top: 6px;
  left: 36px;
  z-index: 1;
  width: 24px;
  height: 24px;
}
.moon svg {
  fill: #73C0FC;
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 1;
  width: 24px;
  height: 24px;
}
.sun svg {
  animation: rotate 15s linear infinite;
}
@keyframes rotate {
  0%   { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}
.moon svg {
  animation: tilt 5s linear infinite;
}
@keyframes tilt {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-10deg); }
  75%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}
.input:checked + .slider {
  background-color: #183153;
}
.input:focus + .slider {
  box-shadow: 0 0 1px #183153;
}
.input:checked + .slider:before {
  transform: translateX(30px);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--accent); }

/* ── SECTIONS ── */
section {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 5vh) 5vw 5vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── HOME ── */
#home {
  position: relative;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.3s;
}

[data-theme="dark"] .grid-bg { opacity: 0.3; }

.glow-orb {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, transparent 70%);
  top: -150px; left: -100px;
  pointer-events: none;
  animation: drift 8s ease-in-out infinite alternate;
}

[data-theme="dark"] .glow-orb {
  background: radial-gradient(circle, rgba(200,255,0,0.08) 0%, transparent 70%);
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(80px, 60px); }
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

.home-text {
  flex: 1;
  min-width: 0;
}

.home-photo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-headshot {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 5px solid var(--accent);
  box-shadow:
    0 0 0 10px var(--accent-light),
    0 30px 80px rgba(79,70,229,0.25);
  animation: fadeUp 0.7s 0.2s ease both;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.home-headshot:hover {
  transform: scale(1.03);
  box-shadow:
    0 0 0 14px var(--accent-light),
    0 40px 90px rgba(79,70,229,0.35);
}

[data-theme="dark"] .home-headshot {
  box-shadow:
    0 0 0 10px rgba(200,255,0,0.08),
    0 30px 80px rgba(200,255,0,0.12);
}

[data-theme="dark"] .home-headshot:hover {
  box-shadow:
    0 0 0 14px rgba(200,255,0,0.12),
    0 40px 90px rgba(200,255,0,0.2);
}

.home-headshot-placeholder {
  display: none;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 3px dashed var(--border);
  background: var(--accent-light);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  animation: fadeUp 0.7s 0.2s ease both;
}

.home-headshot-placeholder span { font-size: 3rem; }
.home-headshot-placeholder small { opacity: 0.7; font-size: 0.68rem; }

@media (max-width: 900px) {
  .home-hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 2.5rem;
  }
  .home-headshot,
  .home-headshot-placeholder {
    width: 220px;
    height: 220px;
  }
}



.home-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}

.home-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.1s ease both;
}

.home-title em {
  font-style: italic;
  color: var(--accent);
}

.home-sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

.home-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79,70,229,0.3);
}

[data-theme="dark"] .btn-primary { color: #0a0a0f; }
[data-theme="dark"] .btn-primary:hover { background: #d4ff1a; box-shadow: 0 8px 30px rgba(200,255,0,0.25); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.linkedin-icon { font-size: 1rem; }

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 5vw;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeUp 1s 0.6s ease both;
}

.scroll-line {
  width: 40px; height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: slide 2s ease infinite;
}

@keyframes slide {
  to { left: 100%; }
}

/* ── ABOUT ── */
#about { background: var(--surface); }

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 3rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}

.about-text p span {
  color: var(--text);
}

/* ── ABOUT HEADSHOT ── */
.headshot-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.about-headshot {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-light), 0 12px 40px rgba(79,70,229,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-headshot:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 8px var(--accent-light), 0 20px 50px rgba(79,70,229,0.3);
}

[data-theme="dark"] .about-headshot {
  box-shadow: 0 0 0 6px rgba(200,255,0,0.1), 0 12px 40px rgba(200,255,0,0.15);
}

[data-theme="dark"] .about-headshot:hover {
  box-shadow: 0 0 0 8px rgba(200,255,0,0.15), 0 20px 50px rgba(200,255,0,0.2);
}

.about-headshot-placeholder {
  display: none;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px dashed var(--border);
  background: var(--accent-light);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.about-headshot-placeholder span { font-size: 2rem; }
.about-headshot-placeholder small { opacity: 0.7; font-size: 0.65rem; }

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.stat-card {
  background: var(--card);
  padding: 2rem;
  transition: background 0.2s;
}

.stat-card:hover { background: #f0f2ff; }
[data-theme="dark"] .stat-card:hover { background: #1e1e2e; }

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skills-section { margin-top: 3rem; }

.skills-section h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-size: 0.72rem;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
  transition: all 0.2s;
  letter-spacing: 0.04em;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,255,0,0.05);
}

/* ── COMPUTERS ── */
.computers-intro {
  max-width: 600px;
  margin-bottom: 3rem;
}

.computers-intro p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.8;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.topic-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--accent);
  transition: height 0.3s ease;
}

.topic-card:hover {
  border-color: rgba(79,70,229,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

[data-theme="dark"] .topic-card:hover {
  border-color: rgba(200,255,0,0.2);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.topic-card:hover::before { height: 100%; }

.topic-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.topic-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.topic-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.topic-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── RESUME ── */
.resume-block {
  margin-bottom: 3rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.resume-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
}

.resume-icon { font-size: 1.2rem; }

.resume-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.resume-entry {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.resume-entry:last-child { border-bottom: none; }
.resume-entry:hover { background: var(--accent-light); }

.resume-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.resume-org {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.resume-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.resume-role {
  font-size: 0.83rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.resume-meta {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.skills-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.skills-category {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
}

.skills-category:last-child { border-right: none; }

.skills-cat-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .skills-category-grid { grid-template-columns: 1fr; }
  .skills-category { border-right: none; border-bottom: 1px solid var(--border); }
  .skills-category:last-child { border-bottom: none; }
  .resume-entry-top { flex-direction: column; }
}

/* ── RESUME DOWNLOAD ── */
.resume-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-light);
  margin-top: 1rem;
  transition: box-shadow 0.3s ease;
}

.resume-download-card:hover {
  box-shadow: 0 8px 30px rgba(79,70,229,0.15);
}

[data-theme="dark"] .resume-download-card:hover {
  box-shadow: 0 8px 30px rgba(200,255,0,0.1);
}

.resume-download-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.resume-download-icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.resume-download-filename {
  font-family: 'DM Mono', monospace;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 0.4rem;
}

.resume-download-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.resume-download-meta-item strong {
  color: var(--text);
  font-weight: 500;
}

.resume-download-meta-divider {
  color: var(--border);
}

.resume-download-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .resume-download-card { flex-direction: column; align-items: flex-start; }
}

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── EASTER EGG ── */
#heartBtn {
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s ease;
  user-select: none;
}
#heartBtn:hover {
  transform: scale(1.4);
}

.easter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.easter-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.easter-box {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  transform: scale(0.85);
  transition: transform 0.3s ease;
}

.easter-overlay.active .easter-box {
  transform: scale(1);
}

.easter-msg {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.easter-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
  padding: 4px;
}
.easter-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

/* From Uiverse.io by FWDJc */
.loader {
  width: 7em;
  height: 5em;
  position: relative;
  animation: beat 1s infinite;
}
.loader::before,
.loader::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50px;
  height: 80px;
  border-radius: 5em 5em 0 0;
  animation: coldblue 1s infinite;
}
.loader::before {
  left: 50px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}
.loader::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}
@keyframes beat {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
@keyframes coldblue {
  0%, 100% { background-color: rgb(255, 255, 255); }
  50%       { background-color: rgb(198, 23, 23); }
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topics-grid { grid-template-columns: 1fr; }
  .home-actions { flex-direction: column; align-items: flex-start; }
  nav { padding: 0 4vw; }
  .nav-links { gap: 1.5rem; }
}
