:root {
  --bg: #0f1724;
  --card: #0c1220;
  --text: #e6eef8;
  --muted: #9aa8bf;
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --glass: rgba(255, 255, 255, 0.04);
  --radius: 12px;
  --max-width: 1100px;
  --shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
  --glass-2: rgba(255, 255, 255, 0.02);
}

/* Light theme */
:root.light {
  --bg: #f7f8fb;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #5b6b7f;
  --accent: #6d28d9;
  --accent-2: #0891b2;
  --glass: rgba(11, 17, 32, 0.03);
  --glass-2: rgba(11, 17, 32, 0.02);
  --shadow: 0 6px 18px rgba(15, 23, 36, 0.06);
}

/* base */
* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(90deg, var(--bg), color-mix(in srgb, var(--bg) 90%, black 10%));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  letter-spacing: 0.1px;
  transition: background .35s ease, color .35s ease;
}

/* containers */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem
}

/* loader */
.site-loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.4), rgba(2, 6, 23, 0.6));
  z-index: 9999;
  backdrop-filter: blur(4px);
  transition: opacity .3s ease, visibility .3s;
}

.site-loader[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none
}

.loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow)
}

.loader-ring {
  animation: spin 1.25s linear infinite
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03)
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text)
}

.brand-logo {
  border-radius: 8px;
  display: block
}

.brand-name {
  font-weight: 700
}

.muted {
  opacity: .75;
  font-weight: 500;
  color: var(--muted)
}

.nav-list {
  display: flex;
  gap: .25rem;
  list-style: none;
  padding: 0;
  margin: 0
}

.nav-link {
  background: none;
  border: none;
  color: var(--muted);
  padding: .5rem .75rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600
}

.nav-link[aria-current="true"],
.nav-link:hover {
  color: var(--text);
  background: var(--glass)
}

.header-actions {
  display: flex;
  gap: .5rem;
  align-items: center
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: .5rem;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer
}

.icon-btn:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent)
}

.menu-btn {
  background: var(--glass);
  border: none;
  padding: .5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.hamburger {
  width: 20px;
  height: 2px;
  background: var(--text);
  display: block;
  position: relative
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  display: block
}

.hamburger::before {
  top: -6px
}

.hamburger::after {
  top: 6px
}

/* mobile menu */
.mobile-menu {
  position: fixed;
  right: 1rem;
  top: 64px;
  background: var(--card);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 80
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem
}

.mobile-menu a {
  display: block;
  padding: .5rem 0;
  color: var(--text);
  text-decoration: none
}

/* main hero */
.hero {
  padding: 4rem 0
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: center
}

.eyebrow {
  color: var(--muted);
  margin: 0
}

h1 {
  font-size: 2.25rem;
  margin: .2rem 0
}

.accent {
  color: var(--accent)
}

.lead {
  font-size: 1.05rem;
  color: var(--muted)
}

.typewriter {
  margin-top: 1rem;
  font-weight: 600
}

.hero-cta {
  margin-top: 1.25rem;
  display: flex;
  gap: .6rem
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .9rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer
}

.btn.small {
  padding: .35rem .6rem;
  font-size: .9rem
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16)
}

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

.meta-row {
  margin-top: 1rem;
  display: flex;
  gap: .5rem;
  align-items: center
}

.social {
  background: var(--glass);
  padding: .5rem;
  border-radius: 8px;
  color: var(--text);
  border: none
}

.badges {
  margin-top: 1rem;
  display: flex;
  gap: .4rem
}

.badge {
  background: var(--glass);
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .85rem
}

/* profile card */
.profile-card {
  background: linear-gradient(180deg, var(--glass), var(--glass-2));
  padding: 1rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem
}

.profile-photo {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover
}

.profile-stats {
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: space-around
}

.profile-stats strong {
  display: block;
  font-size: 1.05rem
}

/* panels */
.panel {
  padding: 3rem 0
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.25rem
}

.about-card {
  background: var(--card);
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: var(--shadow)
}

.btn-resume{
  text-decoration: none;
  color: rgb(12, 204, 214);
}

.skills-overview {
  padding: .6rem .2rem
}

/* skill bars */
.skill-bars {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem
}

.skill-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-content: space-between
}

.skill-row .bar {
  flex: 1;
  margin-left: 1rem;
  background: rgba(255, 255, 255, 0.04);
  height: 10px;
  border-radius: 8px;
  overflow: hidden
}

.fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: var(--w, 60%);
  transition: width .9s cubic-bezier(.2, .9, .2, 1)
}

/* skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem
}

.skill {
  background: var(--card);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow)
}

/* projects */
.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem
}

.project-card {
  background: linear-gradient(180deg, var(--card), transparent);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column
}

.project-media {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer
}

.project-media img {
  display: block;
  width: 100%;
  height: auto
}

.project-body {
  padding: 1rem
}

.project-tags {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin: .5rem 0
}


.tag {
  background: rgba(255, 255, 255, 0.03);
  padding: .25rem .5rem;
  border-radius: 6px;
  font-size: .8rem
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s
}

.modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible
}

.modal-content {
  background: var(--card);
  width: min(1000px, 96%);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  position: relative
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1rem
}

.modal img {
  width: 100%;
  height: auto;
  border-radius: 8px
}

.modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer
}

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 1.25rem
}

.form {
  background: var(--card);
  padding: 1rem;
  border-radius: 12px
}

.form-field {
  display: block;
  margin-bottom: .75rem
}


.label-text {
  display: block;
  margin-bottom: .35rem;
  font-weight: 600
}

.form input,
.form textarea {
  width: 100%;
  padding: .6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: transparent;
  color: var(--text)
}

.form textarea {
  resize: vertical
}

.form .error {
  color: #ffb4b4;
  font-size: .9rem;
  height: 1.05rem
}

.form-actions {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin-top: .6rem
}

.form-feedback {
  margin-top: .8rem;
  color: var(--muted)
}

/* footer */
.site-footer {
  padding: 1.4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 2rem;
  text-align: center
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center
}

/* utils */
.sr-only {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden
}

.muted {
  color: var(--muted)
}

/* responsive */
@media (max-width:1000px) {
  .hero-grid {
    grid-template-columns: 1fr
  }

  .about-grid {
    grid-template-columns: 1fr
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .contact-grid {
    grid-template-columns: 1fr
  }

  .modal-body {
    grid-template-columns: 1fr
  }

  .hero-right {
    order: -1
  }
}

@media (max-width:640px) {
  .nav-list {
    display: none
  }

  /*hamburger visible */
  .menu-btn {
    display: block
  }

  .mobile-menu {
    right: 0;
    left: 0;
    margin: 0;
    top: 60px;
    border-radius: 0
  }

  .projects-grid {
    grid-template-columns: 1fr
  }

  .skills-grid {
    grid-template-columns: 1fr
  }

  .header-inner {
    padding: 0.5rem
  }

  h1 {
    font-size: 1.75rem
  }
}

/* small touches */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 25%, black);
  outline-offset: 3px
}

/* animations */
.fade-up {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease
}

.fade-up.inview {
  opacity: 1;
  transform: none
}

/* small toast style (used by JS) */
.toast {
  transition: opacity .3s ease
}