:root {
  --bg: #0b1120;
  --bg-soft: #111827;
  --surface: #1a2332;
  --surface-hover: #243044;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #0ea5e9;
  --gold: #fbbf24;
  --border: rgba(148, 163, 184, 0.15);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --nav-h: 72px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 48px;
}

/* NAV */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1120 !important;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: calc(var(--nav-h) + 48px) 0 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero-text {
  color: #cbd5e1;
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1120;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.25);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-number {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image-wrap::before {
  content: "";
  position: absolute;
  inset: 8% 0 8% 8%;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(251, 191, 36, 0.15));
  filter: blur(40px);
}

.profile-photo {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top center;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.about-card,
.info-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.about-card p {
  color: #cbd5e1;
  margin-bottom: 14px;
}

.info-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.info-list span:first-child {
  color: var(--muted);
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.skill-chip {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.25s, transform 0.25s;
}

.skill-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* TIMELINE */
.timeline {
  display: grid;
  gap: 20px;
}

.timeline-item {
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
}

.timeline-company {
  color: var(--accent);
  font-weight: 600;
}

.timeline-date {
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline-item ul {
  margin-top: 12px;
  padding-left: 18px;
  color: #cbd5e1;
}

.timeline-item li {
  margin-bottom: 6px;
}

/* EDUCATION & CERTS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* PROJECTS PREVIEW / PAGE */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.project-thumb {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.project-card:hover .project-thumb img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 17, 32, 0.92), transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 18px;
}

.project-tag {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.project-body {
  padding: 22px;
}

.project-body h3 {
  font-size: 1.2rem;
  margin: 6px 0 10px;
}

.project-body p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.project-card-featured .project-thumb {
  height: 260px;
}

/* PROJECT CATEGORIES */
.project-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.category-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow);
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.category-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.category-card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.category-count {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.project-category-block {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.project-category-block:last-child {
  margin-bottom: 0;
}

.category-block-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.category-block-header h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
}

.category-block-header p {
  color: var(--muted);
  max-width: 520px;
  font-size: 0.95rem;
}

.project-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.project-link-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}

.project-link-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.project-link-card .link-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.project-link-card .link-url {
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}

.project-link-card .link-action {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: auto;
}

.category-empty {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .project-categories {
    grid-template-columns: 1fr;
  }
}

/* CONTACT */
.contact-section {
  background: linear-gradient(180deg, var(--bg) 0%, #0f172a 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.contact-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.25s, opacity 0.25s;
}

.social-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.social-wa {
  background: #25d366;
  color: #fff;
}

.social-li {
  background: #0a66c2;
  color: #fff;
}

.social-email {
  background: #334155;
  color: #fff;
  border: 1px solid var(--border);
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #cbd5e1;
}

.contact-detail strong {
  color: var(--text);
  min-width: 80px;
}

/* FLOATING CONTACT */
.floating-contact {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s;
}

.float-btn:hover {
  transform: scale(1.08);
}

.float-wa { background: #25d366; }
.float-li { background: #0a66c2; }
.float-email { background: #475569; }

.float-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: min(920px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px 28px 28px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
}

.modal-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.modal-gallery img:first-child {
  grid-column: 1 / -1;
  height: 240px;
}

/* FOOTER */
footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

footer a {
  color: var(--accent);
}

.page-hero {
  padding: calc(var(--nav-h) + 56px) 0 48px;
  text-align: center;
}

.page-hero .section-desc {
  margin: 0 auto 0;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-h) + 32px);
  }

  .hero-text,
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .hero-stats {
    max-width: 480px;
    margin: 0 auto;
  }

  .hero-image-wrap {
    order: -1;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(11, 17, 32, 0.98);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .section {
    padding: 72px 0;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
  }

  .modal-gallery img:first-child {
    height: 200px;
  }

  .floating-contact {
    right: 14px;
    bottom: 14px;
  }

  .float-btn {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}
