/* ============================================
   Apple-inspired minimal portfolio — white theme
   SF Pro font stack
   ============================================ */

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

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

body {
  font-family: -apple-system, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  background: #ffffff;
  color: #1d1d1f;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* ── Layout ── */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Dividers ── */
.divider {
  border: none;
  border-top: 1px solid #d2d2d7;
  margin: 0;
}

/* ── Nav — Apple Glass ── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
}

.nav-inner {
  width: 100%;
  padding: 0 32px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  isolation: isolate;
  margin-top: z;
}

/* Apple glass layer — matches macOS/iOS translucent bars exactly */
.nav-inner::before {
  content: '';
  position: absolute;
  inset: 0;

  /* Apple's exact frosted-glass recipe */
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);

  /* Crisp bottom separator — the only border Apple uses */
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);

  z-index: -1;
  pointer-events: none;
}

/* Safari liquid-glass enhancement */
@supports (-webkit-backdrop-filter: url(#pack-upper)) {
  .nav-inner::before {
    -webkit-backdrop-filter: url(#pack-upper) url(#liquid-glass-new) url(#fresnel) saturate(180%) blur(6px);
    backdrop-filter: url(#pack-upper) url(#liquid-glass-new) url(#fresnel) saturate(180%) blur(6px);
    background: rgba(255, 255, 255, 0.6);
  }
}

.nav-inner::after {
  content: none;
}

/* ── Logo ── */
.nav-logo {
  font-size: 17px;
  font-weight: 600;
  /* dark text still works on a light background page */
  color: #1d1d1f;
  letter-spacing: -0.02em;
  /* make sure logo sits above the glass pseudo */
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ── Links ── */
.nav-links {
  display: flex;
  gap: 28px;
  position: relative;
  z-index: 1;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(29, 29, 31, 0.75);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  text-decoration: none;
  padding: 4px 0;
  position: relative;
}

/* Active/hover underline accent */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #1d1d1f;
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: #1d1d1f;
}

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

/* ── Hero ── */
.hero {
  padding: 100px 0 96px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 17px;
  font-weight: 400;
  color: #6e6e73;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #1d1d1f;
  margin-bottom: 24px;
}

.hero-body {
  font-size: 19px;
  font-weight: 400;
  color: #6e6e73;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

/* ── Section labels ── */
.section-label {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #1d1d1f;
  margin-bottom: 10px;
}

.section-sub {
  font-size: 16px;
  color: #6e6e73;
  margin-bottom: 40px;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* ── What I Do ── */
.what {
  padding: 80px 0;
}

.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: #d2d2d7;
  border: 1px solid #d2d2d7;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 40px;
}

.service {
  background: #f5f5f7;
  padding: 36px 32px;
}

.service h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1d1d1f;
  margin-bottom: 10px;
}

.service p {
  font-size: 15px;
  color: #6e6e73;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* ── Resume ── */
.resume-section {
  padding: 80px 0;
}

.resume-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: #0071e3;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 980px;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary:hover {
  background: #0077ed;
}

.btn-primary:active {
  background: #005cbf;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: #0071e3;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid #0071e3;
  border-radius: 980px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-ghost:hover {
  background: #0071e3;
  color: #fff;
}

/* ── PDF Section ── */
.pdf-section {
  padding: 80px 0;
}

.pdf-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: #f5f5f7;
  border-radius: 18px;
  border: 1px solid #d2d2d7;
  flex-wrap: wrap;
}

.pdf-icon {
  width: 52px;
  height: 52px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #d2d2d7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d1d1f;
  flex-shrink: 0;
}

.pdf-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pdf-info strong {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

.pdf-info span {
  font-size: 14px;
  color: #6e6e73;
}

/* ── Videos ── */
.videos-section {
  padding: 80px 0;
}

.video-category {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6e6e73;
  margin-bottom: 14px;
  margin-top: 40px;
}

.video-category:first-of-type {
  margin-top: 0;
}

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

.video-grid-full {
  grid-template-columns: 1fr;
  max-width: 560px;
}

.video-card {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d2d2d7;
  background: #f5f5f7;
  transition: box-shadow 0.2s, transform 0.2s;
  color: #1d1d1f;
  cursor: pointer;
}

.video-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e5e5e5;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  border-radius: 980px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

.video-meta {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.video-meta strong {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

.video-meta span {
  font-size: 13px;
  color: #6e6e73;
}

/* ── Contact ── */
.contact {
  padding: 80px 0 100px;
}

.contact-wrap {
  text-align: center;
}

.contact-wrap .section-sub {
  margin-bottom: 32px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.contact-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 980px;
  transition: background 0.2s;
}

.btn-whatsapp:hover {
  background: #1ebe5a;
}

.btn-email {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  background: transparent;
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 980px;
  border: 1.5px solid #d2d2d7;
  transition: border-color 0.2s;
}

.btn-email:hover {
  border-color: #6e6e73;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .hero {
    padding: 72px 0 64px;
  }

  .hero-title {
    font-size: 40px;
  }

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

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

  .video-grid-full {
    max-width: 100%;
  }

  .resume-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }
}

/* ── Credit ── */
.credit {
  text-align: center;
  padding: 20px 24px 32px;
  font-size: 13px;
  color: #6e6e73;
}

.credit a {
  color: #6e6e73;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.credit a:hover {
  color: #1d1d1f;
}

/* ── Video Modal ── */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal.open {
  opacity: 1;
  pointer-events: all;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.video-modal-container {
  position: relative;
  z-index: 1;
  width: min(900px, 92vw);
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.94) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal.open .video-modal-container {
  transform: scale(1) translateY(0);
}

.video-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.video-modal-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-modal-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Web Work Section ── */
.web-section {
  padding: 80px 0;
}

.web-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

/* ── Browser Mockup Card ── */
.web-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d2d2d7;
  background: #f5f5f7;
  cursor: pointer;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.web-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
  transform: translateY(-3px);
}

/* macOS-style chrome strip */
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: #e8e8ed;
  border-bottom: 1px solid #d2d2d7;
}

.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.browser-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
  display: inline-block;
}

.browser-dots .browser-dot:nth-child(2) { background: #ffbd2e; }
.browser-dots .browser-dot:nth-child(3) { background: #28ca41; }

.browser-url-text {
  flex: 1;
  font-size: 12px;
  color: #6e6e73;
  background: rgba(255,255,255,0.75);
  border-radius: 6px;
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
}

/* Screenshot preview */
.browser-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.browser-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.web-card:hover .browser-preview img {
  transform: scale(1.03);
}

/* Card bottom meta */
.web-meta {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.web-meta strong {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

.web-meta span {
  font-size: 13px;
  color: #6e6e73;
}

/* ── Web Preview Modal ── */
.web-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.web-modal.open {
  opacity: 1;
  pointer-events: all;
}

.web-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.web-modal-container {
  position: relative;
  z-index: 1;
  width: min(1100px, 94vw);
  height: min(720px, 88vh);
  background: #1c1c1e;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.web-modal.open .web-modal-container {
  transform: scale(1) translateY(0);
}

/* Browser bar inside modal */
.web-browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #2c2c2e;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.web-browser-dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.web-browser-dots .browser-dot {
  background: #ff5f57;
  cursor: pointer;
}

.web-browser-dots .browser-dot:hover {
  filter: brightness(0.85);
}

.web-browser-url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.web-browser-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.web-browser-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
}

.web-browser-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* iframe frame fills remaining space */
.web-modal-frame {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.web-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Blocked site fallback */
.web-modal-blocked {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #f5f5f7;
  text-align: center;
  padding: 40px;
}

.web-modal-blocked p {
  font-size: 16px;
  color: #6e6e73;
}

/* Responsive */
@media (max-width: 720px) {
  .web-grid {
    grid-template-columns: 1fr;
  }
}