/* ==========================================================================
   PORTFOLIO STYLESHEET - CLEAN, MINIMAL & ELEGANT
   Ade Teguh Ardiansyah
   ========================================================================== */

:root {
  /* Clean Dark Theme (Default) */
  --bg: #0f1115;
  --bg-surface: #15181e;
  --bg-surface-hover: #1c2028;
  --border: #232730;
  --border-subtle: #1c2027;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --tag-bg: #1a1e26;
  --tag-text: #cbd5e1;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --max-w: 1200px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-surface: #f8fafc;
  --bg-surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-subtle: #edf2f7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --tag-bg: #f1f5f9;
  --tag-text: #334155;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  background-color: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background-color 0.2s ease;
}

[data-theme="light"] .header {
  background-color: rgba(255, 255, 255, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

.nav-link {
  font-size: 0.94rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle-btn,
.mobile-menu-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

.mobile-menu-btn {
  display: none;
}

.theme-toggle-btn:hover,
.mobile-menu-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Hero Section */
.hero {
  padding: 5.5rem 0 4.5rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 250px;
  align-items: center;
  gap: 4rem;
}

.hero-avatar {
  width: 240px;
  height: 290px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  justify-self: end;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.hero-content {
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #10b981;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.45rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

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

.btn-primary:hover {
  opacity: 0.9;
}

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

.btn-outline:hover {
  background: var(--bg-surface);
  border-color: var(--text-muted);
}

.btn-whatsapp {
  background: #15803d;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #16a34a;
}

/* Section Common */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Projects Section */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

.project-item {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

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

.project-item.reverse .project-media {
  order: 2;
}

.project-item.reverse .project-info {
  order: 1;
}

.project-media {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-media:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.project-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
}

.project-media.portrait img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background-color: #0b0d11;
}

.project-role {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.project-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.project-bullets li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.project-bullets li::before {
  content: "•";
  color: var(--text-muted);
  font-weight: bold;
}

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

.tag {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-col {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.skill-col h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list li i {
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
}

/* Contact Section */
.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
}

.contact-text h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 620px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.contact-detail-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.contact-detail-row a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Simple Lightbox Modal */
.simple-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.simple-lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 950px;
  width: 100%;
  position: relative;
}

.lightbox-content img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-height: 85vh;
  object-fit: contain;
  background: #090b0e;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet & Medium Screens (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr 210px;
    gap: 2.5rem;
  }

  .hero-avatar {
    width: 210px;
    height: 250px;
  }

  .project-item {
    grid-template-columns: 1.15fr 1fr;
    gap: 2.5rem;
  }

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

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

/* Mobile & Tablet Portrait (max-width: 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .nav-brand {
    font-size: 1.02rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    z-index: 99;
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links .nav-link {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
  }

  /* Hero on Mobile */
  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero-layout {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1.75rem;
  }

  .hero-avatar {
    width: 130px;
    height: 155px;
    border-radius: var(--radius-md);
    justify-self: start;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  .hero-title {
    font-size: 2.05rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 1rem;
  }

  .hero-bio {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  /* Projects on Mobile */
  .section {
    padding: 3.5rem 0;
  }

  .section-heading {
    margin-bottom: 2rem;
  }

  .projects-list {
    gap: 3.25rem;
  }

  .project-item,
  .project-item.reverse {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .project-item.reverse .project-media {
    order: 0;
  }

  .project-item.reverse .project-info {
    order: 1;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .project-desc {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .project-bullets li {
    font-size: 0.85rem;
  }

  /* Skills & About on Mobile */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skill-col {
    padding: 1.25rem;
  }

  /* Contact Box on Mobile */
  .contact-box {
    flex-direction: column;
    align-items: stretch;
    padding: 1.75rem;
    gap: 1.75rem;
  }

  .contact-text h3 {
    font-size: 1.25rem;
  }

  .contact-text p {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .contact-detail-row {
    flex-wrap: wrap;
    font-size: 0.88rem;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  /* Footer on Mobile */
  .footer {
    padding: 2.25rem 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
    font-size: 0.82rem;
  }

  /* Lightbox on Mobile */
  .simple-lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: -38px;
    right: 4px;
    font-size: 1.8rem;
  }
}

/* Extra Small Phones (max-width: 420px) */
@media (max-width: 420px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .nav-brand {
    font-size: 0.95rem;
  }
}
