
:root {
  --nav-h: 60px;
  --pad-x: 20px;

  --radius: 18px;
  --radius-sm: 12px;

  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);

  --bg-overlay: 0.55;

  --text: #eaeaea;
  --muted: rgba(234, 234, 234, 0.72);

  --panel: rgba(18, 18, 24, 0.52);
  --panel-strong: rgba(18, 18, 24, 0.70);

  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);

  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.10);
  --surface-active: rgba(255, 255, 255, 0.12);

  --bg-image: url("../images/dark_bg.png");
  --logo-image: url("../images/home.png");
  --avatar-image: url("../images/avatar.JPEG");
}

[data-theme="light"] {
  --bg-overlay: 0.18;

  --text: #141414;
  --muted: rgba(20, 20, 20, 0.70);

  --panel: rgba(255, 255, 255, 0.80);
  --panel-strong: rgba(255, 255, 255, 0.80);

  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.16);

  --shadow: 0 14px 40px rgba(0, 0, 0, 0.14);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.10);

  --surface: rgba(0, 0, 0, 0.05);
  --surface-hover: rgb(184, 184, 184);
  --surface-active: rgba(0, 0, 0, 0.09);
}
/* =========================================================
   1) RESET / BASE
========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}



body {
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #000; 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  min-height: 100vh;
}

a {
  color: inherit;
}

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


body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  z-index: -2;
  pointer-events: none;
}


body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--bg-overlay));
  z-index: -1;
  pointer-events: none;
}

/* =========================================================
   2) SCROLL / SNAP LAYOUT
========================================================= */
.snap-container {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

html:has(.snap-container),
body:has(.snap-container) {
  overflow: hidden;
}

.page {
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.page.snap {
  height: 100vh;
  scroll-snap-align: start;
  display: grid;
  place-items: center;

  padding: calc(var(--nav-h) + 26px) var(--pad-x) 64px;
}

#p1.page.snap {
  padding: 0 var(--pad-x);
  display: grid;
  place-items: center;
}

#p1.page.snap::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: calc(var(--nav-h) + 26px);
}

#p1 .hero.section {
  margin-top: calc(var(--nav-h) + 26px);
}

.hint {
  position: absolute;
  bottom: 18px;
  left: 18px;
  font-size: 13px;
  opacity: 0.55;
  user-select: none;
}

/* =========================================================
   3) GENERIC CONTENT PANEL (shared)
========================================================= */
.section {
  width: 60%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.section h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.3vw, 38px);
}

.section h2 {
  margin: 18px 0 10px;
  font-size: clamp(16px, 2vw, 22px);
}

.section p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* =========================================================
   4) NAVBAR
========================================================= */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;

  width: min(1100px, calc(100% - 32px));
  height: var(--nav-h);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 14px;
  border-radius: 18px;

  background: rgba(10, 12, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  animation: navDropIn 650ms cubic-bezier(.2, .8, .2, 1) 80ms both;
}

[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.2px;

  background: transparent !important;
}

.logo::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--logo-image) no-repeat center/cover;
  border: 1px solid var(--border);
  filter: invert(1) brightness(1.2);
}

[data-theme="light"] .logo::before {
  filter: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a:not(.logo) {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;

  padding: 8px 10px;
  border-radius: 12px;

  opacity: 0.9;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}

.nav a:not(.logo):hover {
  background: var(--surface);
  opacity: 1;
  transform: translateY(-1px);
}

.nav a:not(.logo).is-active {
  background: var(--surface-active);
  opacity: 1;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);

  min-width: 34px;
  height: 34px;
  padding: 0 8px; 
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.theme-toggle svg {
  pointer-events: none;
}

[data-theme="light"] .sun-icon { display: none !important; }
[data-theme="light"] .moon-icon { display: block !important; }

.moon-icon { display: none; }
.sun-icon { display: block; }

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--surface-active);
}

@keyframes navDropIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* =========================================================
   5) HERO
========================================================= */
.ui {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
}

.hero {
  width: min(900px, 92vw);
  margin: 0 auto;
  text-align: center;
  pointer-events: auto;
}

.hero--split {
  width: min(980px, 92vw);
  text-align: left;

  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: center;
}

.hero-copy { min-width: 0; }

.hero-subtitle {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.hero-bio {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 62ch;
}

.hero-chips { margin-top: 10px; }

.hero-media {
  display: grid;
  place-items: center;
  min-width: 0;
}

.hero.section {
  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  padding-bottom: 40px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: 0.2px;
}

.hero p {
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 15px;
}

.hero--split .hero-actions {
  justify-content: flex-start;
}

/* =========================================================
   6) SHARED UI COMPONENTS (buttons / cards / badges)
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;
  border-radius: 12px;

  border: 1px solid var(--border);
  background: var(--surface);

  color: inherit;
  text-decoration: none;
  font-size: 14px;

  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}



.btn:hover {
  transform: translateY(-1px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn.ghost {
  background: transparent;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;

  padding: 16px;
  border-radius: 14px;

  border: 1px solid var(--border);
  background: var(--surface);

  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.badge {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.20);
  font-size: 13px;
}

/* =========================================================
   7) AVATAR
========================================================= */
.avatar {
  width: 250px;
  height: 250px;
  border-radius: 999px;

  position: absolute;
  top: 26px;
  left: 26px;
  z-index: 2;

  background: var(--avatar-image) no-repeat center/cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

#p1 .hero-media .avatar {
  position: relative;
  top: auto;
  left: auto;
  z-index: 1;

  width: clamp(180px, 22vw, 260px);
  height: clamp(180px, 22vw, 260px);
}

#p1 .hero-media .avatar::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(120, 160, 255, 0.18), transparent 60%);
  filter: blur(10px);
  z-index: -1;
}

#p1 .hero-media .avatar::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1px solid var(--border-strong);
  z-index: -1;
}

/* =========================================================
   8) PROJECTS
========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* =========================================================
   9) PROJECT DETAIL PAGE
========================================================= */
.detail-page {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 34px) var(--pad-x) 64px;
  display: grid;
  place-items: start center;
}

.detail-wrap {
  width: min(1100px, 92vw);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  text-decoration: none;
  color: var(--text);

  padding: 10px 12px;
  border-radius: 999px;

  border: 1px solid var(--border);
  background: var(--panel-strong);

  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
  margin-bottom: 16px;
}


.back-link:hover {
  transform: translateY(-1px);
  background: var(--surface-hover);
}

.back-icon {
  font-size: 16px;
  line-height: 1;
}

.detail-hero {
  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.detail-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.2px;
}

.detail-sub {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.6;
}

.badge-row {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.detail-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.detail-card h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.tech-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  opacity: 0.92;
}

.tech-list .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--border);
}

[data-theme="light"] .tech-list .dot {
  background: rgba(0, 0, 0, 0.25);
}

/* =========================================================
   10) THANK YOU PAGE
========================================================= */
.thank-page {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 34px) var(--pad-x) 64px;
  display: grid;
  place-items: center;
}

.thank-card {
  width: min(720px, 92vw);
  text-align: center;

  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);

  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.thank-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;

  display: grid;
  place-items: center;

  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-active);

  font-size: 22px;
  font-weight: 900;
}

.thank-card h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 40px);
}

.thank-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.thank-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   11) SKILLS (chips + dropdown)
========================================================= */
.chips {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips li {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.20);
  font-size: 13px;
}

.skill-menu {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.skill-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.skill-item summary {
  list-style: none;
  cursor: pointer;
  user-select: none;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.skill-item summary::-webkit-details-marker {
  display: none;
}

.skill-item summary::after {
  content: "▾";
  opacity: 0.75;
  transition: transform 160ms ease;
}

.skill-item[open] summary::after {
  transform: rotate(180deg);
}

.skill-item summary:hover {
  background: var(--surface);
}

.skill-item ul {
  padding: 0 16px 14px 16px;
  list-style: none;
  display: grid;
  gap: 10px;
}

.skill-item ul li {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  opacity: 0.95;
}

[data-theme="light"] .skill-item ul li {
  background: rgba(255, 255, 255, 0.10);
}

/* =========================================================
   12) ABOUT (timeline)
========================================================= */
.timeline {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.t-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: start;

  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.t-date {
  font-weight: 800;
  opacity: 0.9;
}

.t-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.t-desc {
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

/* =========================================================
   13) CONTACT (form)
========================================================= */
.contact-form {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;

  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);

  color: var(--text);
  outline: none;

  transition: border-color 140ms ease, background 140ms ease;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.contact-form button {
  justify-self: start;
  padding: 10px 14px;
  border-radius: 12px;

  border: 1px solid var(--border);
  background: var(--surface-active);

  color: var(--text);
  cursor: pointer;

  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.contact-form button:hover {
  transform: translateY(-1px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

/* =========================================================
   14) UTILITIES
========================================================= */
.muted {
  color: var(--muted);
}

/* =========================================================
   15) TO TOP
========================================================= */
.to-top {
  position: relative;
  right: 20px;
  bottom: 20px;

  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;

  border-radius: 999px;
  text-decoration: none;
  color: var(--text);

  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);

  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  z-index: 9999;
}

.to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transform: translateY(-1px);
}

.to-top:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.40);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.to-top:active {
  transform: translateY(-1px) scale(0.98);
}

.to-top:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18), var(--shadow);
}

[data-theme="light"] .to-top:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12), var(--shadow);
}

/* =========================================================
   16) ANIMATIONS
========================================================= */
.anim {
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition:
    transform 700ms cubic-bezier(.2, .8, .2, 1),
    opacity 500ms ease;
  will-change: transform, opacity;
}

.from-left { transform: translate3d(-40px, 0, 0); }
.from-right { transform: translate3d(40px, 0, 0); }
.from-top { transform: translate3d(0, -40px, 0); }
.from-bottom { transform: translate3d(0, 40px, 0); }

.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 160ms; }
.delay-3 { transition-delay: 240ms; }

.page.is-active .anim {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* =========================================================
   17) RESPONSIVE
========================================================= */
@media (max-width: 820px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero--split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero--split .hero-actions {
    justify-content: center;
  }

  .hero-bio {
    margin-left: auto;
    margin-right: auto;
  }
}


@media (max-width: 560px) {
  :root { --pad-x: 14px; }

  .nav {
    width: calc(100% - 20px);
    border-radius: 16px;
    padding: 8px 10px;
  }

  .nav-right .nav-links a {
    padding: 7px 8px;
    font-size: 13px;
  }

  .logo::before {
    width: 26px;
    height: 26px;
  }

  .section {
    padding: 18px;
  }

  .t-item {
    grid-template-columns: 64px 1fr;
  }
}

/* =========================================================
   18) MOBILE NAV / HAMBURGER
========================================================= */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  width: 40px;
  height: 40px;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle:hover {
  background: var(--surface);
}

.nav-links {
  display: flex;
  gap: 6px;
}
.nav-links a {
  display: inline-flex;
}

@media (max-width: 820px) {
  .snap-container { scroll-snap-type: none; }

  .page { overflow: visible; }

  .page.snap {
    height: auto;
    min-height: 100vh;
    padding-bottom: 56px;
  }

  .detail-grid { grid-template-columns: 1fr; }

  .nav {
    flex-wrap: wrap; 
    height: auto; 
    align-items: flex-start; 
    overflow: hidden; 
    transition: max-height 0.4s ease;
    max-height: var(--nav-h); 
  }

  .nav.is-open {
    max-height: 500px;
    background: var(--panel-strong); 
  }

  .nav-brand {
    justify-content: space-between;
    width: 100%;
    height: calc(var(--nav-h) - 20px); 
    align-items: center;
  }
  
  .nav-toggle {
    display: flex;
  }

  .nav.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .nav.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
    gap: 10px;
  }

  .nav-links {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  .nav-right .nav-links a {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-size: 16px;
    text-align: center;
    background: var(--surface);
  }

  .theme-toggle {
    width: 100%;
    margin-top: 6px;
    justify-content: center;
  }

  .section {
    width: 92%;
    margin: 0 auto;
  }
  
  .hero.section, .hero--split.section, .detail-wrap {
    width: 92%;
  }

  .hero--split {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-media {
    order: -1; 
    margin-bottom: 20px;
  }

  .hero-actions {
    justify-content: center;
  }
  
  .grid {
    grid-template-columns: 1fr; 
  }
}
