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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #0d0221;
  color: #f0e6ff;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3 {
  font-family: 'DM Serif Display', serif;
  line-height: 1.2;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 2rem;
}

/* ===========================
   Layout
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===========================
   Header
   =========================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.site-header.scrolled {
  background: rgba(13, 2, 33, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: #e65100;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #e65100;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #f0e6ff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   Hero
   =========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d0221 0%, #1a0a2e 40%, #150833 100%);
  overflow: hidden;
}

.hero-hexagons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hex {
  position: absolute;
  opacity: 0.08;
}

.hex-1 {
  width: 180px;
  top: 10%;
  left: 5%;
  opacity: 0.1;
}

.hex-2 {
  width: 120px;
  top: 60%;
  left: 15%;
  opacity: 0.06;
}

.hex-3 {
  width: 200px;
  top: 15%;
  right: 8%;
  opacity: 0.09;
}

.hex-4 {
  width: 90px;
  bottom: 20%;
  right: 20%;
  opacity: 0.07;
}

.hex-5 {
  width: 140px;
  bottom: 10%;
  left: 45%;
  opacity: 0.06;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 6rem 1rem 4rem;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #f0e6ff 0%, #ff8f00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #b8a9cc;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, #e65100, #ff8f00);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230, 81, 0, 0.35);
}

/* ===========================
   Projects
   =========================== */
.projects {
  padding: 6rem 0;
  background: #1a0a2e;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.card {
  background: #150833;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.card-image-wrap {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card-image {
  width: 100%;
  height: 100%;
  background: var(--card-bg, linear-gradient(135deg, #e65100, #ff8f00));
  transition: transform 0.4s;
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e65100;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: #f0e6ff;
}

/* ===========================
   About
   =========================== */
.about {
  padding: 6rem 0;
  background: #0d0221;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: #b8a9cc;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.about-decoration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-hex {
  width: 220px;
  opacity: 0.15;
  animation: floatHex 6s ease-in-out infinite;
}

@keyframes floatHex {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}

/* ===========================
   Footer
   =========================== */
.footer {
  padding: 5rem 0 3rem;
  background: #150833;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer-email {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: #e65100;
  transition: color 0.2s;
}

.footer-email:hover {
  color: #ff8f00;
}

.social-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(240, 230, 255, 0.15);
  transition: border-color 0.2s, color 0.2s;
}

.social-link:hover {
  border-color: #e65100;
  color: #e65100;
}

.copyright {
  font-size: 0.85rem;
  color: #b8a9cc;
  margin-top: 1.5rem;
}

/* ===========================
   Scroll-to-top
   =========================== */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(230, 81, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 900;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: #e65100;
}

/* ===========================
   Scroll Reveal
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Responsive — 768px
   =========================== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: rgba(13, 2, 33, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 999;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.15rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-decoration {
    order: -1;
  }

  .about-hex {
    width: 140px;
  }

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

  .hero-content {
    padding: 5rem 0.5rem 3rem;
  }
}
