/* =============================================
   VARIABLES — Night (default)
   ============================================= */
:root {
  --bg:           #05080f;
  --surface:      rgba(255,255,255,0.04);
  --surface-h:    rgba(255,255,255,0.07);
  --border:       rgba(255,255,255,0.10);
  --text:         #f0ede8;
  --muted:        #DFD3C3;
  --accent:       #c9a96e;
  --accent-dim:   rgba(201,169,110,0.15);
  --accent-glow:  rgba(201,169,110,0.30);
  --navbar-bg:    rgba(5,8,15,0.90);
  --footer-bg:    rgba(5,8,15,0.65);
  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'DM Sans', sans-serif;
  --tr:           background 0.45s ease, color 0.45s ease,
                  border-color 0.45s ease, box-shadow 0.45s ease;
}

/* =============================================
   VARIABLES — Day
   ============================================= */
body.day {
  --bg:          #E4DCCF;
  --surface:     rgba(0,0,0,0.04);
  --surface-h:   rgba(0,0,0,0.07);
  --border:      rgba(0,0,0,0.10);
  --text:        #111111;
  --muted:       #555555;
  --accent:      #a0721f;
  --accent-dim:  rgba(160,114,31,0.12);
  --accent-glow: rgba(160,114,31,0.25);
  --navbar-bg:   rgba(180,160,145,0.95);
  --footer-bg:   #E4DCCF;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Kill ALL browser default purple/blue links */
a { color: inherit; text-decoration: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  padding-top: 64px;
  transition: var(--tr);
}

/* Star canvas */
canvas#stars {
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none;
  transition: opacity 0.6s ease;
}
body.day canvas#stars { opacity: 0; }

/* Day sun glow */
body.day::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 35% at 85% -5%, rgba(255,210,90,0.16) 0%, transparent 65%),
    radial-gradient(ellipse 40% 25% at 15% 105%, rgba(255,195,70,0.08) 0%, transparent 60%);
}

.eyebrow {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
  transition: color 0.45s;
}

/* HOME ENTRANCE ANIMATION */
.home-text .eyebrow,
.home-text h3,
.home-text h1,
.home-text h2,
.home-text .home-desc,
.home-text .buttons {
  opacity: 0;
  animation: homeReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-text .eyebrow  { animation-delay: 0.3s; }
.home-text h3        { animation-delay: 0.42s; }
.home-text h1        { animation-delay: 0.54s; }
.home-text h2        { animation-delay: 0.66s; }
.home-text .home-desc{ animation-delay: 0.78s; }
.home-text .buttons  { animation-delay: 0.92s; }

@keyframes homeReveal {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 58px;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0; width: 100%;
  z-index: 1000;
  transition: background 0.45s ease, border-color 0.45s ease;
}

.logo a { display: flex; align-items: center; }

.badge {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 3px 10px;
    margin-left: 20px; 
  border-radius: 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: var(--tr);
}

/* Desktop nav links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  margin-left: auto;  
}
.nav-links li { position: relative; padding-bottom: 4px; }
.nav-links li::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links li:hover::after { width: 100%; }
.nav-links a {
  color: var(--muted);
  font-size: 14px; font-weight: 450;
  letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* Right side: toggle + hamburger */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 24px;  
}

/* Theme toggle */
.theme-toggle {
  background: none; border: none;
  padding: 0; cursor: pointer;
  display: flex; align-items: center;
}
.toggle-track {
  position: relative; display: flex; align-items: center;
  width: 42px; height: 22px; border-radius: 50px;
  background: linear-gradient(135deg,#393E46,#222831);
  border: 1px solid rgba(120,100,220,0.4);
  box-shadow: inset 0 0 6px rgba(80,60,200,0.3), 0 0 8px rgba(100,80,220,0.2);
  transition: background 0.5s, border-color 0.5s, box-shadow 0.5s;
  overflow: hidden;
}
body.day .toggle-track {
  background: linear-gradient(135deg,#E2DCC8,#A5C89E);
  border-color: rgba(100,180,240,0.6);
  box-shadow: inset 0 0 6px rgba(100,200,255,0.3), 0 0 10px rgba(255,210,80,0.35);
}
.toggle-thumb {
  position: absolute; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#e8e8ff,#b0aed0);
  box-shadow: 0 0 6px rgba(180,170,255,0.7), 0 1px 3px rgba(0,0,0,0.4);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), background 0.5s, box-shadow 0.5s;
  z-index: 2;
}
body.day .toggle-thumb {
  transform: translateX(20px);
  background: radial-gradient(circle at 40% 35%,#ffe566,#f5a623);
  box-shadow: 0 0 8px rgba(255,200,50,0.9), 0 0 16px rgba(255,180,30,0.5), 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-icon { position: absolute; font-size: 10px; z-index: 1; transition: opacity 0.3s; }
.toggle-icon.left  { left: 4px;  opacity: 1; }
.toggle-icon.right { right: 4px; opacity: 0; }
body.day .toggle-icon.left  { opacity: 0; }
body.day .toggle-icon.right { opacity: 1; }

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--accent);
  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; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer — hidden by default */
.mobile-drawer {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mobile-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.drawer-link {
  color: var(--muted);
  font-size: 15px; font-weight: 400;
  letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.drawer-link:last-child { border-bottom: none; }
.drawer-link:hover { color: var(--accent); background: var(--surface); }


/* =============================================
   HOME
   ============================================= */
   .home {
     display: flex;
     justify-content: center;    
     align-items: center;
     gap: 350px;                 
     padding: 80px 60px;         
     position: relative; z-index: 1;
     min-height: 90vh;
   }

   .home-image img {
     width: 320px; height: 320px;
     object-fit: cover;
     border-radius: 50%;
     border: 4px solid var(--accent);
     box-shadow: 0 0 50px 15px var(--accent-glow);
     display: block;
     transition: box-shadow 0.3s ease;
   }
   .home-image img:hover {
     box-shadow: 0 0 70px 20px var(--accent-glow);
   }


.home-text { max-width: 560px; }

.home-text h3 {
  font-size: 19px; font-weight: 300;
  color: var(--muted); margin-bottom: 6px;
  letter-spacing: 0.05em; transition: color 0.45s;
}
.home-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 350; color: var(--text);
  line-height: 1.05; margin-bottom: 10px;
  transition: color 0.45s;
}
.home-text h2 {
  font-size: 22px; font-weight: 300;
  color: var(--muted); margin-bottom: 20px;
  transition: color 0.45s;
}
.home-text h2 #typing {
  color: var(--accent);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 27px;
  transition: color 0.45s;
}
.home-desc {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
  transition: color 0.45s;
}

.home-desc .highlight {
  color: var(--accent); 
  font-weight: 350;      
  transition: color 0.3s; 
}

.buttons {
  margin-top: 32px;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.btn {
  padding: 12px 26px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
  display: inline-block;
}
.primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 24px var(--accent-glow);
}
.primary:hover { transform: translateY(-2px); }

.secondary {
  border: 1px solid var(--accent);
  color: var(--accent);
}
.secondary:hover {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 24px var(--accent-glow);
  transform: translateY(-2px);
}

/* =============================================
   ABOUT
   ============================================= */
.about {
  padding: 80px 100px;
  position: relative; z-index: 1;
}
.about-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px;
  backdrop-filter: blur(12px);
  transition: var(--tr);
}
.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem,4vw,3rem);
  font-weight: 300; color: var(--text);
  margin-bottom: 20px; transition: color 0.45s;
}
.about-text p {
  color: var(--muted); line-height: 1.8;
  font-size: 15px; margin-bottom: 14px;
  transition: color 0.45s;
}
.about-stats {
  display: flex; flex-direction: column;
  gap: 16px; min-width: 170px; flex-shrink: 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 24px; border-radius: 14px;
  text-align: center;
  transition: all 0.3s ease;
}
.stat h3 {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 400;
  color: var(--accent); margin-bottom: 4px;
  transition: color 0.45s;
}
.stat p {
  color: var(--muted); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: color 0.45s;
}
.stat:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-dim);
}


/* =============================================
   SHARED SECTION BOX (Skills + Projects)
   ============================================= */
.skills, .projects {
  padding: 80px 100px;
  position: relative; z-index: 1;
}

.section-box {
  display: flex; flex-direction: column; gap: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 52px 56px;
  backdrop-filter: blur(12px);
  transition: var(--tr);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem,4vw,3rem);
  font-weight: 300; color: var(--text);
  transition: color 0.45s;
}
.section-header a {
  font-size: 13px; color: var(--accent);
  letter-spacing: 0.05em; opacity: 0.85;
  transition: opacity 0.2s;
}
.section-header a:hover { opacity: 1; }

/* =============================================
   SKILLS GRID
   ============================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
}
.skill-card {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; padding: 20px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: default;
}
.skill-card iconify-icon {
  font-size: 28px;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.skill-card p {
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.04em; transition: color 0.45s;
}
.skill-card:hover {
  transform: translateY(-5px);
  background: var(--surface-h);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-dim);
}
.skill-card:hover iconify-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

/* =============================================
   PROJECTS GRID
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.project-card {
  display: flex; flex-direction: column;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden; position: relative;
  transition: all 0.3s ease;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,transparent,var(--accent-glow),transparent);
  opacity: 0; transition: opacity 0.3s;
}
.project-card:hover {
  transform: translateY(-5px);
  background: var(--surface-h);
  border-color: var(--accent);
  box-shadow: 0 10px 32px var(--accent-dim);
}
.project-card:hover::before { opacity: 1; }

.project-content {
  display: flex; flex-direction: column;
  flex: 1; padding: 22px 22px 16px; gap: 10px;
}
.card-top { display: flex; flex-direction: column; gap: 8px; }

.project-card h3 {
  font-size: 15px; font-weight: 500;
  color: var(--text); margin: 0;
  line-height: 1.3; transition: color 0.3s;
}
.project-card:hover h3 { color: var(--accent); }

.project-card p {
  font-size: 12.5px; color: var(--muted);
  line-height: 1.65; margin: 0;
}

.project-tech {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.project-tech span {
  font-size: 10.5px; padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-dim);
  border: 1px solid rgba(201,169,110,0.18);
  color: var(--accent); letter-spacing: 0.04em;
  transition: var(--tr);
}

.project-links {
  display: flex; gap: 14px;
  padding: 12px 22px 16px;
}
.project-links a {
  font-size: 13px; color: var(--muted);
  letter-spacing: 0.06em; transition: color 0.2s;
}
.project-links a:hover { color: var(--accent); }


/* =============================================
   CONTACT
   ============================================= */
.contact {
  display: flex; justify-content: center; align-items: center;
  padding: 60px 24px;
  position: relative; z-index: 1;
}
.contact-card {
  width: 100%; max-width: 620px;
  text-align: center;
  padding: 56px 60px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
  transition: all 0.3s ease;
}
.contact-card::before {
  content: '';
  position: absolute; top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 320px; height: 320px;
  background: radial-gradient(circle,var(--accent-dim) 0%,transparent 70%);
  pointer-events: none;
}
.contact-card:hover { box-shadow: 0 0 40px var(--accent-dim); }

.contact-card h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem,5vw,3.2rem);
  font-weight: 300; color: var(--text);
  margin-bottom: 14px; transition: color 0.45s;
}
.contact-card h1 span {
  font-style: italic; color: var(--accent);
  transition: color 0.45s;
}
.contact-card > p {
  color: var(--muted); font-size: 15px;
  line-height: 1.7; margin-bottom: 32px;
  transition: color 0.45s;
}
.icons {
  display: flex; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}
.icons a {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted); font-size: 17px;
  position: relative; overflow: hidden;
  transition: all 0.3s ease;
}
.icons a::before {
  content: ''; position: absolute; inset: 0;
  background: var(--accent-dim); opacity: 0;
  transition: opacity 0.3s;
}
.icons a:hover {
  color: var(--accent); border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--accent-dim);
}
.icons a:hover::before { opacity: 1; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  position: relative; z-index: 1;
  padding: 14px 24px; text-align: center;
  background: var(--footer-bg);
  backdrop-filter: blur(12px);
  transition: background 0.45s ease;
}
.footer-divider {
  width: 100%; height: 1.5px;
  background: linear-gradient(90deg,transparent,var(--border),transparent);
}
.footer-content p {
  margin: 8px 0 0;
  color: var(--muted); font-size: 14px;
  letter-spacing: 0.04em;
  display: flex; align-items: center;
  justify-content: center; gap: 6px;
  transition: color 0.45s;
}
.heart {
  color: #c0392b; font-size: 20px;
  animation: heartbeat 1.5s ease-in-out infinite;
}
.footer-content a {
  color: var(--accent); font-weight: 530;
  transition: opacity 0.2s, color 0.45s;
}


/* =============================================
   KEYFRAMES
   ============================================= */
@keyframes heartbeat {
  0%,100% { transform: scale(1); }
  14%     { transform: scale(1.3); }
  28%     { transform: scale(1); }
  42%     { transform: scale(1.15); }
  56%     { transform: scale(1); }
}

/* =============================================
   MEDIA — TABLET  ≤ 900px
   ============================================= */
@media (max-width: 900px) {

  .home   { padding: 60px 40px; gap: 40px; }
  .about  { padding: 60px 40px; }
  .skills { padding: 60px 40px; }
  .projects { padding: 60px 40px; }

  .section-box { padding: 36px 32px; }
  .about-container { padding: 40px; gap: 40px; }

  .home-image img { width: 260px; height: 260px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 13px; }
}

/* =============================================
   MEDIA — MOBILE  ≤ 640px
   ============================================= */
@media (max-width: 640px) {

  /* ── Navbar ── */
  .navbar { padding: 0 16px; }
  .nav-links { display: none; }           /* hide desktop links */
  .hamburger { display: flex; }           /* show hamburger */
  .mobile-drawer { display: flex; }       /* enable drawer (toggled via JS) */

  /* ── Home: single column, centered ── */
  .home {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px 60px;
    min-height: unset;
    gap: 28px;
  }
  .home-image img {
    width: 160px; height: 160px;
  }
  .home-text {
    max-width: 100%;
  }
  .home-text h1 { font-size: clamp(2.2rem,9vw,3rem); }
  .home-text h2 { font-size: 17px; }
  .home-text h3 { font-size: 15px; }
  .home-text h2 #typing { font-size: 20px; }
  .hero-desc { font-size: 14px; }
  .buttons { justify-content: center; margin-top: 20px; }
  .btn { padding: 11px 22px; font-size: 13px; }

  /* ── About: single column ── */
  .about { padding: 40px 16px; }
  .about-container {
    flex-direction: column;
    padding: 24px 20px; gap: 24px;
  }
  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    min-width: unset; width: 100%; gap: 10px;
  }
  .stat {
    flex: 1 1 calc(33% - 10px);
    min-width: 88px;
    padding: 16px 10px;
  }
  .stat h3 { font-size: 1.7rem; }
  .stat p  { font-size: 11px; }

  /* ── Skills ── */
  .skills { padding: 40px 16px; }
  .section-box { padding: 24px 18px; gap: 20px; }
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .skill-card { padding: 14px 8px; gap: 8px; }
  .skill-card iconify-icon { font-size: 24px; }
  .skill-card p { font-size: 10px; }

  /* ── Projects: single column ── */
  .projects { padding: 40px 16px; }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ── Contact ── */
  .contact { padding: 40px 16px; }
  .contact-card {
    padding: 36px 22px;
    max-width: 100%;
  }
  .contact-card h1  { font-size: clamp(1.8rem,7vw,2.4rem); }
  .contact-card > p { font-size: 14px; }
  .icons a { width: 44px; height: 44px; font-size: 16px; }
}