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

:root {
  /* ═══ DARK THEME (Nothing-style pure black) ═══ */
  --bg: #000000;
  --bg2: #050505;
  --card: #0a0a0a;
  --card-hover: #111111;
  --border: #1c1c1c;
  --text: #ffffff;
  --text2: #999999;
  --accent: #d4ff00;
  --accent2: #ffffff;
  --gradient: linear-gradient(135deg, #ffffff, #999999);
  --radius: 16px;
  --sidebar-w: 80px;

  /* Font size scale */
  --fs: 16px;
}

/* Font size modifiers */
html.font-small  { --fs: 13px; }
html.font-medium { --fs: 16px; }
html.font-large  { --fs: 19px; }
html.font-xlarge { --fs: 22px; }

html { scroll-behavior: smooth; font-size: var(--fs); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow: hidden;
  height: 100vh;
  transition: background 0.5s ease, color 0.5s ease;
}
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════
   LIGHT THEME (Nothing Light Style)
   ═══════════════════════════════════════ */
html.light {
  --bg: #f5f5f5;
  --bg2: #ebebeb;
  --card: #ffffff;
  --card-hover: #f0f0f0;
  --border: #d6d6d6;
  --text: #000000;
  --text2: #555555;
  --accent: #000000;
  --accent2: #333333;
  --gradient: linear-gradient(135deg, #000000, #555555);
}
html.light .sidebar {
  background: rgba(245,245,245,0.55);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right-color: rgba(0,0,0,0.08);
}
html.light .bottom-nav {
  background: rgba(245,245,245,0.55);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top-color: rgba(0,0,0,0.08);
}
html.light .mockup-window {
  box-shadow: 0 16px 50px rgba(0,0,0,0.08);
}
html.light .bg-dots { opacity: 0.12; }
html.light .settings-toggle {
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border-color: var(--border);
}
html.light .settings-toggle:hover { background: #fff; }
html.light .settings-panel {
  background: #ffffff;
  border-color: var(--border);
}
html.light .nav-btn::before { background: var(--accent); }
html.light .section-title::after { background: var(--gradient); }

/* ========== SIDEBAR (desktop — Apple glassmorphism) ========== */
.sidebar {
  position: fixed; left: 0; top: 0;
  width: var(--sidebar-w); height: 100vh;
  background: rgba(30, 30, 30, 0.45);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; z-index: 100;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1), background 0.5s;
}

/* ========== BOTTOM NAV (mobile — Apple glassmorphism) ========== */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(30, 30, 30, 0.45);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(255,255,255,0.08);
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  transition: background 0.5s, border-color 0.5s;
}

.bnav-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  background: none; border: none;
  color: var(--text2); font-size: 0.65rem;
  cursor: pointer; padding: 6px 12px;
  border-radius: 10px; transition: 0.35s;
  font-family: inherit;
}
.bnav-btn:hover { color: var(--text); }
.bnav-btn.active { color: var(--accent); }

/* ── Nav Buttons (shared) ── */
.nav-btn, .bnav-btn {
  position: relative;
}
.nav-btn {
  width: 56px; height: 56px;
  background: transparent; border: none;
  border-radius: 12px; cursor: pointer;
  color: var(--text2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; transition: all 0.35s cubic-bezier(.4,0,.2,1);
  font-family: inherit;
}
.nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-btn.active { color: var(--accent); background: rgba(6,182,212,0.08); }
.nav-btn::before {
  content: ''; position: absolute; left: -12px;
  width: 3px; height: 0; background: var(--accent);
  border-radius: 0 3px 3px 0;
  transition: height 0.4s cubic-bezier(.4,0,.2,1);
}
.nav-btn.active::before { height: 28px; }
.nav-label {
  font-size: 7.5px; text-transform: uppercase;
  letter-spacing: 0.5px; font-weight: 600; margin-top: 2px;
}

/* ========== SECTIONS CONTAINER ========== */
.sections-container {
  margin-left: var(--sidebar-w);
  width: calc(100vw - var(--sidebar-w));
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  transition: margin-left 0.45s cubic-bezier(.4,0,.2,1), width 0.45s;
}
.sections-container::-webkit-scrollbar { width: 0; }

.section {
  min-height: 100vh;
  scroll-snap-align: start;
  padding: 3rem 3.5rem;
  display: flex; flex-direction: column;
  justify-content: flex-start;
  position: relative; overflow: hidden;
  /* Smooth reveal */
  opacity: 0;
  transform: translateY(50px) scale(0.985);
  transition: opacity 0.85s cubic-bezier(.4,0,.2,1),
              transform 0.85s cubic-bezier(.4,0,.2,1);
}
.section.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* BG dots */
.bg-dots {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  transition: background 0.5s, opacity 0.5s;
}
.section > *:not(.bg-dots) { position: relative; z-index: 1; }

/* ========== SECTION TITLE ========== */
.section-title {
  font-family: 'Caveat', cursive;
  font-size: 3rem; font-weight: 700;
  display: inline-block; margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 4px;
}
.section-title::after {
  content: ''; display: block;
  width: 50px; height: 4px;
  background: var(--gradient); margin-top: 10px; border-radius: 2px;
}

/* ========== ABOUT ========== */
.about-content {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center;
  margin-top: 2rem; flex: 1;
}
.about-subtitle { font-size: 1.15rem; color: var(--accent); font-weight: 600; margin: 1rem 0 0.5rem; }
.about-desc { color: var(--text2); font-size: 1rem; line-height: 1.85; max-width: 480px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.4rem; }
.atag {
  padding: 4px 14px; border-radius: 50px;
  background: rgba(6,182,212,0.07);
  border: 1px solid rgba(6,182,212,0.18);
  color: var(--accent); font-size: 0.82rem; font-weight: 500;
  transition: 0.3s;
}
.atag:hover { background: rgba(6,182,212,0.15); transform: translateY(-1px); }

/* Mockup — Nothing monochrome style */
.mockup-window {
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  max-width: 420px; margin-left: auto;
  transition: 0.5s;
}
html.light .mockup-window {
  background: #ffffff;
  border-color: #d6d6d6;
  box-shadow: 0 16px 50px rgba(0,0,0,0.08);
}
.mockup-bar {
  height: 30px; background: #0a0a0a;
  border-bottom: 1px solid #1a1a1a;
  display: flex; align-items: center; padding-left: 12px; gap: 6px;
  transition: 0.5s;
}
html.light .mockup-bar {
  background: #f0f0f0;
  border-bottom-color: #d6d6d6;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ffffff; opacity: 0.3; }
.dot.yellow { background: #ffffff; opacity: 0.5; }
.dot.green { background: #ffffff; opacity: 0.7; }
html.light .dot.red { background: #000; opacity: 0.2; }
html.light .dot.yellow { background: #000; opacity: 0.4; }
html.light .dot.green { background: #000; opacity: 0.6; }

.mockup-body {
  padding: 22px; font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; line-height: 2;
}
.code-line { white-space: nowrap; }
.code-line.indent { padding-left: 22px; }

/* ========== SKILLS ========== */
#skills { padding-bottom: 2rem; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.4rem; margin-top: 2.2rem; flex: 1;
}
.skill-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1),
              border-color 0.45s, box-shadow 0.45s, background 0.5s;
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6,182,212,0.3);
  box-shadow: 0 14px 40px rgba(0,0,0,0.25);
}
.skill-icon { font-size: 1.8rem; margin-bottom: 10px; }
.skill-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.skill-bar-item { margin-bottom: 12px; }
.skill-bar-header {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--text2); margin-bottom: 5px;
}
.skill-pct { color: var(--accent); font-weight: 600; }
.skill-bar-bg {
  height: 5px; background: rgba(128,128,128,0.1);
  border-radius: 3px; overflow: hidden;
}
.skill-bar-fill {
  height: 100%; width: 0;
  background: var(--gradient); border-radius: 3px;
  transition: width 1.4s cubic-bezier(.25,.46,.45,.94);
}

/* ========== PROJECTS ========== */
#projects { padding-bottom: 2rem; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem; margin-top: 2.2rem; flex: 1;
}
.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1),
              border-color 0.45s, box-shadow 0.45s, background 0.5s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6,182,212,0.3);
  box-shadow: 0 14px 40px rgba(0,0,0,0.25);
}
.project-img {
  height: 160px; overflow: hidden;
}
.project-img img {
  width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.5s;
}
.project-card:hover .project-img img { transform: scale(1.08); }
.project-info { padding: 1.4rem; }
.project-info h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.project-info p { font-size: 0.85rem; color: var(--text2); line-height: 1.6; margin-bottom: 12px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.project-tags span {
  padding: 3px 10px; border-radius: 50px;
  background: rgba(6,182,212,0.07);
  border: 1px solid rgba(6,182,212,0.14);
  font-size: 0.72rem; color: var(--accent); font-weight: 500;
}

/* ========== CONTACTS ========== */
.contact-content {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem; margin-top: 2.2rem; align-items: start;
}
.contact-intro { color: var(--text2); font-size: 1.05rem; margin-bottom: 1.4rem; line-height: 1.7; }
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), border-color 0.4s, background 0.5s;
}
.contact-item:hover { border-color: var(--accent); transform: translateX(5px); }
.contact-icon { font-size: 1.4rem; }
.contact-label { font-size: 0.75rem; color: var(--text2); }
.contact-value { font-weight: 600; font-size: 0.9rem; margin-top: 1px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { position: relative; }
.form-group input, .form-group textarea {
  width: 100%; padding: 13px 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text);
  font-family: inherit; font-size: 0.9rem;
  outline: none;
  transition: border-color 0.35s, box-shadow 0.35s, background 0.5s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.08);
}
.form-group label {
  position: absolute; left: 16px; top: 13px;
  color: var(--text2); font-size: 0.9rem;
  pointer-events: none; transition: 0.3s;
}
.form-group input:focus + label, .form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label, .form-group textarea:not(:placeholder-shown) + label {
  top: -7px; left: 10px; font-size: 0.7rem;
  background: var(--bg); padding: 0 5px; color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 30px; background: var(--gradient);
  color: #fff; border: none; border-radius: 50px;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), box-shadow 0.4s;
  align-self: flex-start;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(6,182,212,0.3); }
.submit-btn.sent { background: #28c840; }

/* ========== TOP-RIGHT BUTTONS ========== */
.top-right-btns {
  position: fixed; top: 18px; right: 18px;
  display: flex; gap: 10px; align-items: center;
  z-index: 200;
}

/* MAX download */
.max-download {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(30, 30, 30, 0.55);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
}
.max-download:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.max-download svg { stroke: var(--accent); }
.max-label { letter-spacing: 0.3px; }
html.light .max-download {
  background: rgba(245,245,245,0.7);
  border-color: rgba(0,0,0,0.1);
}
html.light .max-download:hover {
  background: rgba(245,245,245,0.9);
}

/* ========== SETTINGS TOGGLE ========== */
.settings-toggle {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 12px; border: 1px solid var(--border);
  background: rgba(30, 30, 30, 0.55);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), color 0.3s, background 0.3s;
}
.settings-toggle:hover { color: var(--accent); transform: rotate(40deg) scale(1.05); }

/* ========== SETTINGS PANEL ========== */
.settings-panel {
  position: fixed; top: 18px; right: 18px;
  width: 300px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0; z-index: 210;
  opacity: 0; pointer-events: none;
  transform: translateY(-12px) scale(0.96);
  transition: opacity 0.4s cubic-bezier(.4,0,.2,1),
              transform 0.4s cubic-bezier(.4,0,.2,1),
              background 0.5s, border-color 0.5s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.settings-panel.open {
  opacity: 1; pointer-events: auto;
  transform: translateY(0) scale(1);
}

.settings-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.settings-header h3 { font-size: 0.95rem; font-weight: 700; }
.settings-close {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: none;
  color: var(--text2); cursor: pointer;
  font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
  transition: 0.3s;
}
.settings-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.settings-group { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.settings-group:last-child { border-bottom: none; }
.settings-label {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text2); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 10px; display: block;
}

.theme-btns, .font-btns, .device-btns {
  display: flex; gap: 8px;
}

.theme-btn, .font-btn, .device-toggle {
  flex: 1; padding: 9px 8px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text2);
  font-family: inherit; font-size: 0.78rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
}
.theme-btn:hover, .font-btn:hover, .device-toggle:hover {
  border-color: var(--accent); color: var(--text);
}
.theme-btn.active, .font-btn.active, .device-toggle.active {
  border-color: var(--accent); color: var(--accent);
  background: rgba(6,182,212,0.08);
}

.font-btn { font-weight: 700; }
.font-btn[data-size="small"]  { font-size: 0.7rem; }
.font-btn[data-size="medium"] { font-size: 0.82rem; }
.font-btn[data-size="large"]  { font-size: 0.95rem; }
.font-btn[data-size="xlarge"] { font-size: 1.1rem; }

/* ========== DEVICE MODAL ========== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s cubic-bezier(.4,0,.2,1);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 3rem 2.5rem;
  max-width: 520px; width: 90%; text-align: center;
  transform: translateY(30px) scale(0.94);
  transition: transform 0.55s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.modal-overlay.open .modal-card { transform: translateY(0) scale(1); }

.modal-card h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.modal-card > p { color: var(--text2); font-size: 0.95rem; margin-bottom: 2rem; }

.modal-choices { display: flex; gap: 1.2rem; }
.device-choice {
  flex: 1; padding: 2rem 1rem;
  background: var(--bg); border: 2px solid var(--border);
  border-radius: 16px; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  font-family: inherit;
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
}
.device-choice:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(6,182,212,0.15);
}
.device-emoji { font-size: 3rem; }
.device-label { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.device-desc { font-size: 0.78rem; color: var(--text2); line-height: 1.4; }

/* ══════════════════════════════════════════
   MOBILE MODE (when phone is selected)
   ══════════════════════════════════════════ */
body.mode-phone .sidebar { display: none; }
body.mode-phone .bottom-nav { display: flex; }
body.mode-phone .sections-container {
  margin-left: 0; width: 100vw;
  scroll-snap-type: none;
}
body.mode-phone .section {
  min-height: auto;
  padding: 2rem 1.2rem;
  padding-bottom: 3rem;
  scroll-snap-align: none;
  transform: translateY(30px) scale(0.99);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1),
              transform 0.8s cubic-bezier(.4,0,.2,1);
}
body.mode-phone .section.visible {
  opacity: 1; transform: translateY(0) scale(1);
}
body.mode-phone .about-content {
  grid-template-columns: 1fr; gap: 2rem;
}
body.mode-phone .about-visual { order: -1; }
body.mode-phone .mockup-window { margin: 0 auto; max-width: 100%; }
body.mode-phone .skills-grid { grid-template-columns: 1fr; }
body.mode-phone .projects-grid { grid-template-columns: 1fr; }
body.mode-phone .contact-content { grid-template-columns: 1fr; gap: 2rem; }
body.mode-phone .form-row { grid-template-columns: 1fr; }
body.mode-phone .section-title { font-size: 2.2rem; }
body.mode-phone .settings-panel {
  width: calc(100vw - 24px);
  max-width: 260px;
  right: 12px;
  top: 56px;
}
body.mode-phone .settings-header { padding: 10px 12px; }
body.mode-phone .settings-group { padding: 8px 12px; }
body.mode-phone .settings-label { font-size: 0.65rem; margin-bottom: 6px; }
body.mode-phone .theme-btns,
body.mode-phone .font-btns,
body.mode-phone .device-btns { gap: 4px; }
body.mode-phone .theme-btn,
body.mode-phone .font-btn,
body.mode-phone .device-toggle {
  padding: 6px 4px;
  font-size: 0.65rem;
  border-radius: 7px;
}
body.mode-phone .top-right-btns {
  top: 12px; right: 12px;
}
body.mode-phone .max-download {
  padding: 6px 10px;
}
body.mode-phone .max-download .max-label {
  display: none;
}
body.mode-phone .settings-toggle {
  width: 36px; height: 36px;
}
body.mode-phone .settings-panel {
  width: calc(100vw - 24px);
  max-width: 260px;
  right: 12px;
  top: 56px;
  background: rgba(30,30,30,0.55);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* Phone mode: smooth scroll sections with extra spacing */
body.mode-phone .sections-container {
  padding-bottom: 80px;
}

/* Phone mode card entrance stagger */
body.mode-phone .skill-card,
body.mode-phone .project-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1),
              transform 0.7s cubic-bezier(.4,0,.2,1);
}
body.mode-phone .skill-card.revealed,
body.mode-phone .project-card.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
/* Desktop: cards always visible — override any hidden state */
.skill-card,
.project-card {
  opacity: 1 !important;
  transform: none !important;
}

/* ═══ NOTHING-STYLE ═══ */
.kw { color: #d4ff00; }
.kw { color: #d4ff00; }
.var { color: #ffffff; }
.prop { color: #999999; }
.str { color: #cccccc; }
.num { color: #d4ff00; }
html.light .kw { color: #000000; }
html.light .var { color: #000000; }
html.light .prop { color: #555555; }
html.light .str { color: #333333; }
html.light .num { color: #000000; }

/* Tags in Nothing style */
.atag {
  background: rgba(255,255,255,0.05);
  border-color: #222;
  color: #ffffff;
}
.atag:hover {
  background: rgba(255,255,255,0.1);
  border-color: #444;
}
html.light .atag {
  background: rgba(0,0,0,0.04);
  border-color: #ccc;
  color: #000000;
}
html.light .atag:hover {
  background: rgba(0,0,0,0.08);
}

/* Project tags Nothing style */
.project-tags span {
  background: rgba(255,255,255,0.05);
  border-color: #222;
  color: #cccccc;
}
html.light .project-tags span {
  background: rgba(0,0,0,0.04);
  border-color: #ccc;
  color: #333333;
}

/* Skill bar in Nothing style */
.skill-bar-bg {
  background: #1a1a1a;
}
.skill-bar-fill {
  background: #ffffff;
}
html.light .skill-bar-bg { background: #e0e0e0; }
html.light .skill-bar-fill { background: #000000; }

/* Settings panel Nothing style */
.theme-btn.active, .font-btn.active, .device-toggle.active {
  border-color: #ffffff;
  color: #ffffff;
  background: rgba(255,255,255,0.06);
}
html.light .theme-btn.active,
html.light .font-btn.active,
html.light .device-toggle.active {
  border-color: #000000;
  color: #000000;
  background: rgba(0,0,0,0.05);
}

/* Submit button Nothing style */
.submit-btn {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
}
.submit-btn:hover {
  box-shadow: 0 8px 25px rgba(255,255,255,0.15);
}
html.light .submit-btn {
  background: #000000;
  color: #ffffff;
}
html.light .submit-btn:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Nav active indicator */
.nav-btn::before {
  background: #ffffff;
}
.nav-btn.active {
  color: #ffffff;
  background: rgba(255,255,255,0.06);
}
html.light .nav-btn::before { background: #000000; }
html.light .nav-btn.active { color: #000000; background: rgba(0,0,0,0.05); }

/* Skill pct */
.skill-pct { color: #ffffff; }
html.light .skill-pct { color: #000000; }

/* Contact value */
.contact-value { color: #ffffff; }
html.light .contact-value { color: #000000; }

/* Section title */
.section-title { color: #ffffff; }
html.light .section-title { color: #000000; }

/* About subtitle */
.about-subtitle { color: #ffffff; }
html.light .about-subtitle { color: #000000; }

/* Modal */
.modal-card {
  background: #0a0a0a;
  border-color: #1c1c1c;
}
html.light .modal-card {
  background: #ffffff;
  border-color: #d6d6d6;
}
.device-choice {
  background: #111111;
  border-color: #1c1c1c;
  color: #ffffff;
}
.device-choice:hover {
  border-color: #ffffff;
  background: #1a1a1a;
}
html.light .device-choice {
  background: #f5f5f5;
  border-color: #d6d6d6;
  color: #000000;
}
html.light .device-choice:hover {
  border-color: #000000;
  background: #eeeeee;
}

/* Glow dot */
.glow-dot {
  position: fixed; width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 70%);
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(.4,0,.2,1), height 0.4s;
  mix-blend-mode: screen;
}
html.light .glow-dot { display: none; }
body.mode-phone .glow-dot { display: none !important; }

/* ═══ TYPEWRITER EFFECT ═══ */
.tw {
  min-height: 1.2em;
}
.tw-char {
  opacity: 0;
  transition: opacity 0.08s ease;
}
.tw-char.typed {
  opacity: 1 !important;
}
.tw-cursor {
  display: inline-block;
  opacity: 0;
  font-weight: 300;
  animation: cursorBlink 0.7s step-end infinite;
  color: var(--accent);
}
@keyframes cursorBlink {
  50% { opacity: 0; }
}

/* ═══ Toggle switch ═══ */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0;
}
.toggle-label {
  font-size: 0.82rem; color: var(--text2);
}
.toggle-hint {
  font-size: 0.68rem; color: var(--text2);
  opacity: 0.6; margin-top: 6px; line-height: 1.4;
}
.toggle-switch {
  position: relative;
  width: 40px; height: 22px;
  display: inline-block;
}
.toggle-switch input {
  opacity: 0; width: 0; height: 0;
}
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}
.toggle-slider::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--text2);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), background 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: rgba(6,182,212,0.2);
  border-color: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(18px);
  background: var(--accent);
}

/* ═══ Optimize mode — disable all animations ═══ */
html.optimize .tw-char { opacity: 1 !important; transition: none !important; }
html.optimize .tw-cursor { display: none !important; }
html.optimize .section { transition: none !important; }
html.optimize .sections-container { scroll-behavior: auto !important; scroll-snap-type: none !important; }
html.optimize .skill-bar-fill { transition: none !important; }
html.optimize .handwritten::after { transition: none !important; }
html.optimize .nav-btn::before { transition: none !important; }
html.optimize .bnav-btn { transition: none !important; }
html.optimize .skill-card,
html.optimize .project-card { transition: none !important; }
html.optimize .contact-item { transition: none !important; }
html.optimize .submit-btn { transition: none !important; }
html.optimize .settings-toggle { transition: none !important; }
html.optimize .settings-panel { transition: none !important; }
html.optimize .modal-overlay { transition: none !important; }
html.optimize .modal-card { transition: none !important; }
html.optimize body { transition: none !important; }
html.optimize .atag { transition: none !important; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  :root { --sidebar-w: 60px; }
  .nav-label { display: none; }
  .section { padding: 2rem 1.5rem; }
  .about-content { grid-template-columns: 1fr; gap: 2rem; }
  .contact-content { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .settings-panel {
    width: calc(100vw - 32px);
    max-width: 260px;
    top: 12px; right: 12px;
  }
  .settings-header { padding: 10px 12px; }
  .settings-group { padding: 8px 12px; }
  .settings-label { font-size: 0.65rem; margin-bottom: 6px; }
  .theme-btns, .font-btns, .device-btns { gap: 4px; }
  .theme-btn, .font-btn, .device-toggle {
    padding: 6px 4px; font-size: 0.65rem; border-radius: 7px;
  }
  .settings-toggle { width: 32px; height: 32px; }
}

/* ═══ MAX BROWSER MODAL ═══ */
.max-modal-card {
  text-align: center;
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 90%;
}
.max-modal-card .modal-close-btn {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: none;
  color: var(--text2); cursor: pointer;
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: 0.3s;
}
.max-modal-card .modal-close-btn:hover {
  background: rgba(255,255,255,0.1); color: var(--text);
}
.max-modal-logo {
  margin: 0 auto 1.5rem;
  width: 80px; height: 80px;
  border-radius: 20px;
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.max-modal-title {
  font-size: 1.8rem; font-weight: 800;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.max-modal-desc {
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.max-modal-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: var(--gradient);
  color: #fff; border: none; border-radius: 50px;
  font-family: inherit; font-size: 1rem;
  font-weight: 700; text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}
.max-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6,182,212,0.3);
}
