:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a26;
  --bg-card-hover: #22222e;
  --text-primary: #e8e6e3;
  --text-secondary: #9a9a9a;
  --text-muted: #6a6a6a;
  --accent: #c9a84c;
  --accent-dim: #a8883a;
  --accent-glow: rgba(201, 168, 76, 0.15);
  --border: #2a2a36;
  --border-light: #3a3a46;
  --gradient-gold: linear-gradient(135deg, #c9a84c 0%, #e2c97a 50%, #c9a84c 100%);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --section-padding: 100px 0;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: justify;
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: all 0.4s ease;
  background: transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.03) 0%, transparent 40%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(201, 168, 76, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  padding-right: 2rem;
}

.hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo-slot {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 4 / 5;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-name .accent {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 520px;
}

.hero-meta {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: left;
}

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.hero-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #dbb85a;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── SECTIONS ── */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  font-weight: 300;
}

.section-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-divider hr {
  border: none;
  height: 1px;
  background: var(--border);
}

/* ── ABOUT ── */
.about-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  text-align: justify;
}

.about-text p:first-of-type {
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.8;
  text-align: justify;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.highlight-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.highlight-icon {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.highlight-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.highlight-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── SERVICES ── */
.services-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-dim);
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: justify;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.service-tag {
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(201, 168, 76, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.experience-timeline {
  position: relative;
  padding-left: 3rem;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -3rem;
  top: 0.3rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 1;
  transform: translateX(-5px);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.timeline-role {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
  text-align: justify;
}

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

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

.skill-group-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 600;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(42, 42, 54, 0.5);
}

.skill-name {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.skill-level {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-dim);
}

/* ── CONTACT ── */
.contact-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-link-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.contact-link:hover .contact-link-icon {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 3rem;
}

.footer-col-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.footer-legal a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--accent);
}

/* ── LEGAL PAGES ── */
.legal-page {
  min-height: 100vh;
  padding-top: 120px;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 100px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 3rem;
  transition: color 0.3s ease;
}

.legal-back:hover {
  color: var(--accent);
}

.legal-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

.legal-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.8;
  text-align: justify;
}

.legal-content ul, .legal-content ol {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-content em {
  color: var(--text-muted);
  font-style: italic;
}

/* ── IMAGE PLACEHOLDERS ── */
.img-slot {
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.img-slot:hover {
  border-color: var(--accent-dim);
}

.img-slot-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  padding: 1rem;
}

/* About image */
.about-image-wrap {
  display: flex;
  align-items: stretch;
}

.about-img {
  width: 100%;
  min-height: 400px;
}

/* Service card image */
.service-img {
  width: 100%;
  height: 180px;
  margin-bottom: 1.5rem;
  border: 2px dashed var(--border-light);
}

.service-img .img-slot-label {
  font-size: 0.6rem;
}

/* Project cards */
.projects-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.4s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.project-img {
  width: 100%;
  height: 280px;
}

.project-info {
  padding: 2rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  text-align: justify;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 968px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

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

  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-text {
    padding-right: 0;
  }

  .hero-photo {
    order: -1;
  }

  .hero-photo-slot {
    max-width: 300px;
  }

  .hero-label {
    justify-content: center;
  }

  .hero-label::before {
    display: none;
  }

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

  .hero-meta {
    justify-content: center;
    gap: 2rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-meta {
    gap: 2rem;
  }

  .footer-top {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-nav {
    gap: 2rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .hero-meta {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

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

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

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2.5rem;
  }

  .hero-stat-number {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }
}
