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

:root {
  --primary:    #222222;
  --secondary:  #7B7B7B;
  --tertiary:   #F8F8F8;
  --white:      #FFFFFF;
  --border:     rgba(34,34,34,0.1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--primary);
  overflow-x: hidden;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--tertiary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }


/* ============ CONTAINER ============ */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%);
  width: auto;
  z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(34,34,34,0.12);
  border-radius: 999px;
  transition: background 0.3s var(--ease), box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 4px 24px rgba(34,34,34,0.10);
}

.nav-inner {
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pill-style active link (Home) */
.nav-home-link {
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 6px 16px !important;
  border-radius: 999px !important;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  display: block;
}

.nav-links a:hover { background: rgba(34,34,34,0.07); }

/* ============ HERO — BASKARA STYLE ============ */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Green radial gradient background */
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 30% 0%,
    #4a9d3d 0%,
    #3a8a2f 20%,
    #306D29 45%,
    #2a5e23 75%,
    #4a9d3d 130%
  );
  z-index: 0;
}

/* Giant name text behind everything */
.hero-bigname {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -44%);
  font-family: 'DM Sans', sans-serif;
  font-weight: 900;
  font-size: clamp(5rem, 16vw, 14rem);
  letter-spacing: -0.04em;
  color: var(--white);
  text-shadow: 
    2px 2px 8px rgba(0,0,0,0.4),
    -2px -2px 8px rgba(0,0,0,0.2);
  white-space: nowrap;
  z-index: 1;
  user-select: none;
  opacity: 0;
  animation: fadeIn 0.8s 0.1s var(--ease) forwards;
  line-height: 1;
  paint-order: stroke fill;
  -webkit-text-stroke: 0.5px rgba(0,0,0,0.2);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -42%); }
  to   { opacity: 1; transform: translate(-50%, -44%); }
}

/* Photo layered on top of the name */
.hero-photo-wrap {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(280px, 38vw, 560px);
  z-index: 2;
  opacity: 0;
  animation: riseUp 0.9s 0.25s var(--ease) forwards;
}

@keyframes riseUp {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hero-photo {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}

.hero-photo-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,255,255,0.25);
  border-radius: 16px 16px 0 0;
  border: 2px dashed rgba(34,34,34,0.25);
  color: var(--primary);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

.hero-photo-placeholder span { font-size: 3rem; }
.hero-photo-placeholder small { font-size: 0.72rem; opacity: 0.6; }

/* Bottom-left caption */
.hero-caption-left {
  position: absolute;
  bottom: 60px;
  left: 48px;
  z-index: 3;
  max-width: 260px;
  opacity: 0;
  animation: fadeIn 0.7s 0.5s var(--ease) forwards;
}

.hero-caption-left p,
.hero-caption-right p {
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
}

/* Bottom-right caption */
.hero-caption-right {
  position: absolute;
  bottom: 60px;
  right: 48px;
  z-index: 3;
  max-width: 240px;
  text-align: right;
  opacity: 0;
  animation: fadeIn 0.7s 0.6s var(--ease) forwards;
}

/* Bottom bar */
.hero-bar {
  position: absolute;
  bottom: 24px;
  left: 48px;
  right: 48px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 14px;
  opacity: 0;
  animation: fadeIn 0.7s 0.7s var(--ease) forwards;
}

.hero-bar-left,
.hero-bar-right {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ MARQUEE ============ */
.marquee-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--tertiary);
  overflow: hidden;
  padding: 18px 0;
  position: relative;
  mask-image: linear-gradient(90deg, 
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(90deg, 
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  animation: marqueeScroll 28s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
}

.marquee-track .dot {
  color: var(--primary);
  font-size: 0.6rem;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ SECTION COMMON ============ */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

.section-heading em { font-style: italic; color: var(--secondary); }

/* ============ ABOUT ============ */
.about {
  padding: 100px 0;
  background: var(--white);
}

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

.about-img-wrap {
  position: relative;
}

.about-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1.1;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.about-img-placeholder {
  width: 100%;
  aspect-ratio: 1/1.1;
  background: var(--tertiary);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.about-accent {
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 80%;
  height: 80%;
  border: 2px solid var(--border);
  border-radius: 16px;
  z-index: -1;
}

.about-body {
  font-size: 1rem;
  color: var(--secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-body strong { color: var(--primary); font-weight: 500; }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0;
}

.skill-pill {
  background: var(--tertiary);
  color: var(--primary);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  transition: background 0.2s, transform 0.2s;
}

.skill-pill:hover { background: var(--primary); color: var(--white); transform: translateY(-2px); }

.about-socials {
  display: flex;
  gap: 16px;
  align-items: center;
}

.about-socials a {
  color: var(--secondary);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}

.about-socials a:hover { color: var(--primary); transform: translateY(-2px); }

/* ============ PROJECTS ============ */
.projects {
  padding: 100px 0;
  background: var(--tertiary);
}

.project-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--border);
}

.project-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.project-row.reverse { direction: rtl; }
.project-row.reverse > * { direction: ltr; }

.project-number {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--border);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.project-tags span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  background: var(--white);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.project-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1.5px solid var(--primary);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.project-link:hover { opacity: 0.6; }

.project-visual a { display: block; text-decoration: none; }

.project-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.project-image:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(34,34,34,0.10);
}

.project-img-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.project-img-placeholder:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(34,34,34,0.10);
}

/* ============ SERVICES ============ */
.services {
  padding: 100px 0;
  background: var(--primary);
}

.services .section-label { color: var(--secondary); }
.services .section-heading { color: var(--white); }
.services .section-heading em { color: var(--secondary); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 40px 36px;
  transition: background 0.3s, transform 0.3s var(--ease);
}

.service-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-4px);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  display: block;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--secondary);
  line-height: 1.7;
}

/* ============ CONTACT ============ */
.contact {
  padding: 120px 0;
  background: var(--white);
  text-align: center;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.contact-heading em { font-style: italic; color: var(--secondary); }

.contact-sub {
  font-size: 1rem;
  color: var(--secondary);
  max-width: 480px;
  margin: 0 auto 56px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  text-decoration: none;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s;
}

.contact-item:last-child { border-bottom: none; }
.contact-item:hover { background: var(--tertiary); }

.contact-icon { font-size: 1.1rem; }
.contact-arrow { margin-left: auto; color: var(--secondary); font-size: 0.85rem; }

/* ============ FOOTER ============ */
.footer {
  background: var(--primary);
  padding: 60px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
  display: block;
  margin-bottom: 8px;
}

.footer-logo span { color: var(--secondary); }

.footer-left p {
  font-size: 0.85rem;
  color: var(--secondary);
}

.footer-sub {
  font-size: 0.75rem !important;
  margin-top: 4px;
}

.footer-right {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
}

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

.footer-right a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
}

.footer-bottom p {
  font-size: 0.72rem;
  color: rgba(123,123,123,0.6);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ============ RESPONSIVE ============ */

/* ─────── Hide captions below 1100px to prevent clipping ─────── */
@media (max-width: 1100px) {
  .hero-caption-left, .hero-caption-right { display: none; }
}

/* ─────── Tablet (768px - 1024px) ─────── */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .section-heading { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
  .project-row { gap: 40px; margin-bottom: 60px; padding-bottom: 60px; }
  .services-grid { gap: 20px; }
  .service-card { padding: 32px 28px; }
}

/* ─────── Desktop to Tablet (max 900px) ─────── */
@media (max-width: 900px) {
  .container { padding: 0 24px; }

  /* Navigation */
  /* Nav links always visible */

  /* Hero */
  .hero-bigname { font-size: clamp(3.5rem, 22vw, 8rem); }
  .hero-bar { left: 20px; right: 20px; bottom: 16px; font-size: 0.65rem; }
  .hero-photo-wrap { width: clamp(260px, 75vw, 480px); }

  /* About */
  .about { padding: 80px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-img-wrap { max-width: 100%; }
  .about-body { font-size: 0.95rem; }

  /* Projects */
  .projects { padding: 80px 0; }
  .project-row {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 60px;
    padding-bottom: 60px;
  }
  .project-row.reverse { direction: ltr; }
  .project-visual { order: -1; }
  .project-title { font-size: clamp(1.3rem, 2vw, 1.8rem); }
  .project-desc { font-size: 0.9rem; }

  /* Services */
  .services { padding: 80px 0; }
  .services-grid { grid-template-columns: 1fr; gap: 18px; }
  .service-card { padding: 28px 24px; }
  .service-card h3 { font-size: 1.1rem; }
  .service-card p { font-size: 0.85rem; }

  /* Contact */
  .contact { padding: 100px 0; }
  .contact-heading { font-size: clamp(2rem, 4vw, 3.5rem); }
  .contact-links { max-width: 100%; }
  .contact-item { padding: 18px 24px; font-size: 0.9rem; }

  /* Footer */
  .footer { padding: 50px 0 28px; }
  .footer-inner { flex-direction: column; gap: 24px; }
}

/* ─────── Mobile Tablet (600px - 768px) ─────── */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .container { padding: 0 18px; }
  .section-heading { margin-bottom: 40px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
  .section-label { font-size: 0.65rem; margin-bottom: 12px; }

  /* Navigation */
  .nav { top: 12px; }
  .nav-inner { padding: 8px 16px; }

  /* Hero */
  .hero { min-height: 80vh; }
  .hero-bigname { font-size: clamp(2.8rem, 21vw, 6rem); }
  .hero-photo-wrap { width: clamp(240px, 78vw, 400px); bottom: -30px; }
  .hero-bar { padding-top: 10px; font-size: 0.6rem; }

  /* About */
  .about { padding: 60px 0; }
  .about-grid { gap: 32px; }
  .about-body { font-size: 0.9rem; margin-bottom: 16px; }
  .skills-grid { margin: 24px 0; }
  .skill-pill { font-size: 0.72rem; padding: 6px 12px; }

  /* Projects */
  .projects { padding: 60px 0; }
  .project-row {
    gap: 20px;
    margin-bottom: 48px;
    padding-bottom: 48px;
  }
  .project-number { font-size: 0.75rem; margin-bottom: 8px; }
  .project-title { font-size: clamp(1.1rem, 2vw, 1.5rem); margin-bottom: 12px; }
  .project-desc { font-size: 0.85rem; margin-bottom: 16px; line-height: 1.6; }
  .project-tags { gap: 6px; margin-bottom: 20px; }
  .project-tags span { font-size: 0.65rem; padding: 4px 10px; }
  .project-link { font-size: 0.8rem; }

  /* Services */
  .services { padding: 60px 0; }
  .service-icon { font-size: 1.8rem; margin-bottom: 16px; }
  .service-card { padding: 24px 18px; }
  .service-card h3 { font-size: 1rem; margin-bottom: 10px; }
  .service-card p { font-size: 0.8rem; line-height: 1.6; }

  /* Contact */
  .contact { padding: 80px 0; }
  .contact-heading { font-size: clamp(1.6rem, 3.5vw, 2.8rem); margin-bottom: 16px; }
  .contact-sub { font-size: 0.9rem; margin-bottom: 40px; }
  .contact-links { border-radius: 14px; }
  .contact-item { padding: 16px 18px; font-size: 0.85rem; gap: 12px; }
  .contact-icon { font-size: 1rem; }

  /* Footer */
  .footer { padding: 40px 0 24px; }
  .footer-logo { font-size: 1.4rem; }
  .footer-left p { font-size: 0.8rem; }
  .footer-right { gap: 18px; }
  .footer-right a { font-size: 0.8rem; }
  .footer-bottom p { font-size: 0.65rem; }
}

/* ─────── Mobile (max 600px) ─────── */
@media (max-width: 600px) {
  html { font-size: 14px; }
  .container { padding: 0 14px; }

  /* Navigation */
  .nav { top: 8px; }
  .hamburger span { width: 18px; height: 1.2px; }
  .mobile-menu { top: 60px; padding: 12px 20px 16px; min-width: 180px; }
  .mobile-menu ul { gap: 12px; }
  .mobile-menu a { font-size: 0.9rem; }

  /* Hero */
  .hero { min-height: 70vh; }
  .hero-bigname { font-size: clamp(2.4rem, 20vw, 5rem); }
  .hero-photo-wrap { width: clamp(220px, 82vw, 340px); bottom: -25px; }
  .hero-bar { left: 14px; right: 14px; bottom: 12px; padding-top: 8px; font-size: 0.55rem; }
  .hero-bar-left, .hero-bar-right { font-size: 0.55rem; }

  /* Section Heading */
  .section-label { font-size: 0.6rem; margin-bottom: 10px; }
  .section-heading { font-size: clamp(1.3rem, 2.8vw, 1.8rem); margin-bottom: 28px; }

  /* About */
  .about { padding: 50px 0; }
  .about-body { font-size: 0.85rem; }
  .about-socials { gap: 12px; }

  /* Projects */
  .projects { padding: 50px 0; }
  .project-row {
    gap: 16px;
    margin-bottom: 40px;
    padding-bottom: 40px;
  }
  .project-number { font-size: 0.7rem; }
  .project-title { font-size: clamp(1rem, 1.8vw, 1.3rem); }
  .project-desc { font-size: 0.8rem; }
  .project-tags span { font-size: 0.6rem; padding: 3px 8px; }

  /* Services */
  .services { padding: 50px 0; }
  .service-icon { font-size: 1.6rem; margin-bottom: 12px; }
  .service-card { padding: 18px 14px; }
  .service-card h3 { font-size: 0.95rem; margin-bottom: 8px; }
  .service-card p { font-size: 0.75rem; }

  /* Contact */
  .contact { padding: 70px 0; }
  .contact-heading { font-size: clamp(1.4rem, 3vw, 2.2rem); }
  .contact-item { padding: 14px 14px; font-size: 0.8rem; }
  .contact-icon { font-size: 0.95rem; }

  /* Footer */
  .footer-logo { font-size: 1.2rem; }
  .footer-left p { font-size: 0.75rem; }
  .footer-right { gap: 14px; }
  .footer-right a { font-size: 0.75rem; }
}
