:root{
  --fg: #e6eef8;
  --card-text: #0b1220;
  --bg-overlay: rgba(6,8,15,0.45);
  --accent: #0d6efd;
  --muted: #9aa3ad;
  --card-bg: rgba(255,255,255,0.96);
  --radius: 12px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;

  display: flex;
  flex-direction: column;
  min-height: 100vh;

  background-color: #000;
  background-image: url("assets/images/home.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.page-home    { background-image: url("assets/images/home.jpg"); }
body.page-projects{ background-image: url("assets/images/projects.png"); }
body.page-resume  { background-image: url("assets/images/resume.jpg"); }
body.page-contact { background-image: url("assets/images/contact.jpg"); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(var(--bg-overlay), var(--bg-overlay));
  pointer-events: none;
  z-index: 0;
}

main.container { flex: 1 0 auto; }

header, main, footer, .hero-inner, .project-card, .cards, .hook-modal { position: relative; z-index: 1; }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  background: linear-gradient(90deg, rgba(13,27,42,0.85), rgba(18,30,48,0.85));
  color: var(--fg);
  position: sticky;
  top: 0;
  z-index: 120;
  backdrop-filter: blur(4px);
}
.brand { font-weight: 700; color: var(--fg); text-decoration: none; }
.nav-list { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: rgba(230,238,248,0.95); text-decoration: none; font-weight: 600; padding: 0.25rem 0.4rem; border-radius: 6px; }
.nav-list a[aria-current="page"] { background: rgba(255,255,255,0.06); }

.container { max-width: var(--max-width); margin: 2rem auto; padding: 0 1rem; }

.hero {
  display: flex;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 10px 40px rgba(2,6,23,0.28);
  backdrop-filter: blur(6px);
  min-height: 36vh;
}
.hero--split { flex-wrap: wrap; }

.hero__media {
  flex: 0 0 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 30px rgba(2,6,23,0.45);
  display: block;
}

.hero__content { flex: 1 1 420px; display: flex; flex-direction: column; gap: 0.5rem; }
.hero__title { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.6rem); color: var(--fg); line-height: 1.05; }
.hero__subtitle { margin: 0.25rem 0 0.75rem 0; color: rgba(230,238,248,0.92); font-size: 1.02rem; max-width: 70ch; }
.hero__badges { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 0.75rem 0; }
.hero__badges li {
  background: rgba(255,255,255,0.06);
  color: var(--fg);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.hero__cta { display: flex; gap: 0.75rem; margin: 0.6rem 0; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 0;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(13,110,253,0.18); }
.btn--outline { background: transparent; color: var(--fg); border: 1px solid rgba(255,255,255,0.12); }
.btn--ghost { background: transparent; color: var(--fg); border: 1px solid rgba(255,255,255,0.06); }

.hero__note { margin-top: 0.6rem; color: rgba(230,238,248,0.82); font-size: 0.95rem; }

.cards { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.1rem;
  background: var(--card-bg);
  color: var(--card-text);
  border-radius: 10px;
  text-decoration: none;
  min-width: 160px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(2,6,23,0.04);
}

.project-card {
  background: var(--card-bg);
  color: var(--card-text);
  padding: 1rem;
  border-radius: 10px;
  margin: 1rem 0;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 30px rgba(2,6,23,0.06);
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  box-shadow: 0 8px 30px rgba(2,6,23,0.08);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.gallery-item {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
  transition: transform .18s ease, filter .18s ease;
  border-radius: 6px;
}
.gallery-item:hover img { transform: scale(1.03); filter: saturate(1.05); }

.hook {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 140;
  background: linear-gradient(180deg, var(--accent), #0a58ca);
  color: #fff;
  border: 0;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(2,6,23,0.35);
  cursor: pointer;
  font-weight: 700;
}

.hook-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2,6,23,0.6);
  z-index: 150;
  padding: 1rem;
}
.hook-modal[aria-hidden="false"] { display: flex; }
.hook-panel {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(2,6,23,0.4);
  position: relative;
  z-index: 151;
}
.hook-close {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  background: transparent;
  border: 0;
  font-size: 1.05rem;
  cursor: pointer;
  color: #374151;
  z-index: 152;
}

.footer .hook-close,
.footer .close-btn,
.footer .contact-close { display: none !important; }

.hook-panel h2 { margin: 0 0 0.6rem 0; color: #111827; }
.hook-form label { display: block; margin: 0.6rem 0 0.2rem; font-weight: 600; color: #374151; }
.hook-form input, .hook-form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: #0b1220;
}
.hook-actions { display: flex; gap: 0.6rem; margin-top: 0.8rem; align-items: center; }
.btn--ghost { background: transparent; border: 1px solid #e6eef8; color: var(--fg); }

.status { margin-top: 0.6rem; color: var(--muted); }

.footer {
  flex-shrink: 0;
  width: 100%;
  background: linear-gradient(90deg, rgba(13,27,42,0.95), rgba(6,12,20,0.95));
  color: var(--fg);
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 -6px 20px rgba(2,6,23,0.25);
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-left strong { display: block; font-weight: 700; color: var(--fg); }
.footer-sub { color: rgba(230,238,248,0.8); font-size: 0.9rem; margin-top: 0.25rem; }
.footer-right { display: flex; align-items: center; gap: 1rem; }
.footer-nav a { color: rgba(230,238,248,0.95); text-decoration: none; margin-right: 0.6rem; padding: 0.25rem 0.45rem; border-radius: 6px; transition: background .15s; }
.footer-nav a:hover { background: rgba(255,255,255,0.03); }
.footer-copy { color: rgba(230,238,248,0.7); font-size: 0.9rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1000px) {
  .project-grid { grid-template-columns: 1fr; gap: 1rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero { padding: 1rem; }
  .hero__media { flex: 0 0 160px; }
  .hero__photo { width: 160px; height: 160px; }
  .hero__content { flex: 1 1 100%; }
}
@media (max-width: 700px) {
  .nav-list { display: none; }
  .hero { min-height: 28vh; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
  .hero__media { order: 0; }
  .hero__content { order: 1; }
  .hero__badges { justify-content: center; }
  .cards { justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}

.page-resume .hero {
  min-height: auto;
  padding: 1.2rem 1.25rem;
}

.page-resume .hero__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.page-resume .hero__subtitle {
  max-width: 60ch;
}

.graph-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.graph-card {
  background: var(--card-bg);
  color: var(--card-text);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
}

.graph-card h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.bar {
  margin-bottom: 0.7rem;
  font-weight: 600;
}

.bar span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.bar-track {
  background: #e5e7eb;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-track div {
  height: 100%;
  background: linear-gradient(90deg, #0d6efd, #3b82f6);
}

.circle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.circle {
  --size: 94px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) calc(var(--p) * 1%),
    #e5e7eb 0);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: 0.75rem;
  position: relative;
}

.circle::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: white;
  border-radius: 50%;
}

.circle span {
  position: relative;
  z-index: 1;
  color: #111827;
  line-height: 1.1;
}

@media (max-width: 900px) {
  .graph-grid {
    grid-template-columns: 1fr;
  }
}

.page-resume .project-card,
.page-resume .graph-card {
  background: rgba(15, 23, 42, 0.65);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.page-resume .project-card h2,
.page-resume .graph-card h3 {
  color: #f8fafc;
}

.page-resume .project-card p {
  color: #d1d5db;
}

.page-resume .bar-track {
  background: rgba(255, 255, 255, 0.15);
}

.page-resume .bar-track div {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.page-resume .circle::before {
  background: rgba(15, 23, 42, 0.85);
}

.page-resume .circle span {
  color: #f1f5f9;
}

.page-resume .timeline-item {
  border-left: 3px solid #38bdf8;
}

.page-resume .timeline-date {
  color: #94a3b8;
}

.page-projects .project-card {
  background: rgba(15, 23, 42, 0.65);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.35);
}
.page-projects .project-card h3 {
  color: #f8fafc;
}

.page-projects .project-card p {
  color: #d1d5db;
}

.page-projects .project-meta {
  color: #cbd5f5;
}

.page-projects .muted {
  color: #9ca3af;
}
.page-projects .project-image {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  border-radius: 8px;
}
.page-projects .gallery-item {
  border-radius: 8px;
}

.page-projects .gallery-item img {
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  filter: saturate(0.95);
}

.page-projects .gallery-item:hover img {
  transform: scale(1.04);
  filter: saturate(1.05);
}

.contact-section textarea {
  resize: none;
}

.page-contact .project-card {
  background: rgba(15, 23, 42, 0.65);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.page-contact .project-card h2 {
  color: #f8fafc;
}

.page-contact label {
  display: block;
  margin-top: 0.7rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: #e6eef8;
}

.page-contact input,
.page-contact textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  color: #e6eef8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.6rem;
  font: inherit;
}

.page-contact input::placeholder,
.page-contact textarea::placeholder {
  color: rgba(230, 238, 248, 0.6);
}

.page-contact textarea {
  resize: none;
}

.page-contact .status {
  color: #94a3b8;
}
/* === Global entrance animation base === */
.is-animated {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.is-animated.active {
  opacity: 1;
  transform: translateY(0);
}

/* === Page-specific animations === */

/* Home tab */
body.page-home .hero.active {
  animation: fadeInUp 0.8s ease forwards;
}

/* Projects tab */
body.page-projects .project-card.active,
body.page-projects .gallery-item.active {
  animation: zoomIn 0.7s ease forwards;
}

/* Resume tab */
body.page-resume .graph-card.active,
body.page-resume .circle.active {
  animation: scaleUp 0.9s ease forwards;
}

/* Contact tab */
body.page-contact .project-card.active,
body.page-contact form.active {
  animation: slideIn 0.8s ease forwards;
}

/* === Keyframes === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}



.graph-card .bar-track div {
  width: 0; 
  transition: width 1s ease-out;
}


.circle {
  transition: background 1s ease-out, transform 0.6s ease;
}
.circle.revealed {
  transform: scale(1.05);
}


.graph-card.is-animated {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.graph-card.is-animated.active {
  opacity: 1;
  transform: translateY(0);
}


.timeline-item.is-animated {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.is-animated.active {
  opacity: 1;
  transform: translateX(0);
}



.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.circle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(13,110,253,0.4);
}


.gallery-item:hover img {
  transform: scale(1.05);
  filter: saturate(1.1);
  transition: transform 0.3s ease, filter 0.3s ease;
}
