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

:root {
  --yellow:   #F0B429;
  --yellow-dim:#C8941A;
  --bg:       #0C0C0C;
  --bg2:      #111111;
  --surface:  #181818;
  --border:   #272727;
  --text:     #EEEEEE;
  --muted:    #888888;
  --white:    #FFFFFF;
  --font:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ── Scroll reveal ─────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ── Button ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--yellow);
  color: #000;
  padding: 14px 32px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--yellow-dim); transform: translateY(-2px); }
.btn-large { padding: 18px 48px; font-size: 17px; }

.accent { color: var(--yellow); }

/* ── Nav ───────────────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 40px;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
#nav.scrolled {
  background: rgba(12, 12, 12, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--yellow);
  letter-spacing: 0.08em;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--yellow) !important;
  color: #000 !important;
  padding: 9px 22px;
  border-radius: 4px;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--yellow-dim) !important; }
.nav-email {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-email:hover { color: var(--yellow); }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 40px 80px;
  position: relative;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(240,180,41,0.07) 0%, transparent 60%),
    var(--bg);
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 20px;
}
.hero-name {
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 800;
  line-height: 0.93;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 36px;
}
.hero-summary {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 52px;
  max-width: 520px;
}
/* ── Hero photo ────────────────────────────────────────────────────────────── */
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}
.hero-text { flex: 1; }

.hero-photo-wrap {
  flex-shrink: 0;
}
.hero-photo-frame {
  position: relative;
  width: 320px;
  height: 320px;
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  display: block;
  position: relative;
  z-index: 1;
  filter: grayscale(15%);
  transition: filter 0.4s ease;
}
.hero-photo:hover { filter: grayscale(0%); }

.hero-photo-border {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 2px solid var(--yellow);
  transform: translate(10px, 10px);
  z-index: 0;
  transition: transform 0.3s ease;
}
.hero-photo-frame:hover .hero-photo-border {
  transform: translate(14px, 14px);
}

@media (max-width: 900px) {
  .hero-inner { flex-direction: column-reverse; align-items: flex-start; gap: 40px; }
  .hero-photo-frame { width: 220px; height: 220px; }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--yellow), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ── Logo strip ────────────────────────────────────────────────────────────── */
#logos {
  padding: 56px 40px;
  background: #F2F2F2;
}
.logos-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 36px;
}
.logos-track {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px 64px;
}
.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: brightness(0) opacity(0.55);
  transition: filter 0.35s ease, transform 0.25s ease;
  height: 30px;
}
.logo-item:hover {
  filter: brightness(1) opacity(1);
  transform: translateY(-2px);
}
.logo-item img {
  height: 26px;
  max-width: 130px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.logo-text {
  display: none;
  font-size: 16px;
  font-weight: 700;
  color: #666;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Sections shared ───────────────────────────────────────────────────────── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 40px;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 64px;
}

/* ── About ─────────────────────────────────────────────────────────────────── */
#about { background: var(--bg); }

.about-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: start;
}
.about-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.about-card:hover {
  border-color: var(--yellow);
  transform: translateX(4px);
}
.card-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.about-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.about-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.about-card strong { color: var(--text); }

/* ── Bento grid ────────────────────────────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 190px 150px 110px;
  gap: 10px;
  position: sticky;
  top: 100px;
}

.bento-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.bento-cell:hover {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

/* iPhone mockup — spans rows 1–2 */
.bento-iphone {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #141414 0%, #1e1a2e 100%);
  padding: 16px;
}
.iphone-frame {
  width: 130px;
  height: 270px;
  background: #0a0a0a;
  border-radius: 36px;
  border: 3px solid #333;
  box-shadow:
    0 0 0 1px #222,
    0 24px 48px rgba(0,0,0,0.8),
    inset 0 0 0 1px #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 18px;
}
.iphone-island {
  width: 44px;
  height: 12px;
  background: #000;
  border-radius: 10px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  border: 2px solid #1a1a1a;
}
.iphone-screen {
  width: 100%;
  flex: 1;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  padding: 28px 10px 8px;
  overflow: hidden;
  gap: 6px;
}
.app-statusbar {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  color: #aaa;
  font-weight: 600;
  margin-bottom: 2px;
}
.app-greeting {
  font-size: 7px;
  color: #555;
  font-weight: 500;
}
.app-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.app-card {
  background: #1a1a1a;
  border-radius: 10px;
  flex-shrink: 0;
}
.app-card-hero {
  height: 58px;
  background: linear-gradient(135deg, #1a1a2e, #2a1a0e);
  border: 1px solid rgba(240,180,41,0.2);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.app-card-tag {
  font-size: 6px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.05em;
}
.app-card-title {
  font-size: 8px;
  font-weight: 700;
  color: #fff;
}
.app-row {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.app-card-sm {
  flex: 1;
  height: 36px;
  border-radius: 8px;
}
.app-card-accent {
  background: var(--yellow);
  opacity: 0.85;
}
.app-card-bar {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  flex-shrink: 0;
}
.app-bar-icon {
  font-size: 9px;
  color: var(--yellow);
  flex-shrink: 0;
}
.app-bar-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.app-bar-line {
  height: 3px;
  background: #333;
  border-radius: 2px;
  width: 100%;
}
.app-bar-line-short { width: 60%; }
.app-tabbar {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid #1e1e1e;
  padding-top: 6px;
  flex-shrink: 0;
}
.tab {
  font-size: 11px;
  color: #444;
  cursor: pointer;
}
.tab.active { color: var(--yellow); }

/* Code terminal */
.bento-code {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--border);
  flex-shrink: 0;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red    { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green  { background: #28C840; }
.code-filename {
  font-size: 10px;
  color: var(--muted);
  margin-left: 4px;
  letter-spacing: 0.05em;
}
.code-body {
  font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace;
  font-size: 10.5px;
  line-height: 1.65;
  padding: 10px 12px;
  overflow: hidden;
  flex: 1;
  white-space: pre;
}
.c-key  { color: #FF79C6; }
.c-type { color: #8BE9FD; }
.c-str  { color: #F0B429; }
.c-num  { color: #BD93F9; }
.c-fn   { color: #50FA7B; }
.c-op   { color: var(--muted); }
.c-comment { color: #555; }

/* Caffeine badge */
.bento-badge {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  background: #1a1208;
  border-color: rgba(240,180,41,0.25);
}
.badge-pulse {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.badge-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.badge-company {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.badge-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

/* Stats */
.bento-stat {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 20px;
}
.bento-users {
  grid-column: 2;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 20px;
  background: var(--yellow);
  border-color: var(--yellow);
}
.bento-users:hover { border-color: var(--yellow-dim); }
.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.bento-users .stat-number { color: #000; }
.stat-number span { color: var(--yellow); font-size: 24px; }
.bento-users .stat-number span { color: rgba(0,0,0,0.4); }
.stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.bento-users .stat-label { color: rgba(0,0,0,0.6); }

/* ── Process timeline ──────────────────────────────────────────────────────── */
#process { background: var(--bg2); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
  z-index: 0;
}
.process-step {
  position: relative;
  z-index: 1;
  padding: 0 20px 0 0;
}
.step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--bg2);
  margin-bottom: 20px;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 2;
}
.process-step:hover .step-dot { transform: scale(1.4); }
.step-number {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--yellow);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.step-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Skills ────────────────────────────────────────────────────────────────── */
#skills { background: var(--bg); }
.skills-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}
.skill-group h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags span {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  transition: border-color 0.2s, color 0.2s;
}
.tags span:hover { border-color: var(--yellow); color: var(--yellow); }

/* ── Contact ───────────────────────────────────────────────────────────────── */
#contact {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  text-align: center;
}
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-sub {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
  margin-top: -40px;
  max-width: 440px;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 40px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  /* Hero: stack vertically */
  .hero-inner         { flex-direction: column-reverse; align-items: flex-start; gap: 36px; }
  .hero-photo-frame   { width: 180px; height: 180px; }

  /* About: single column, bento below cards */
  .about-layout       { grid-template-columns: 1fr; }
  .bento-grid         { position: static; grid-template-rows: 200px 150px 100px; }

  /* Process: 2 columns */
  .process-steps        { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .process-steps::before{ display: none; }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  /* Nav */
  #nav            { padding: 0 20px; }
  .nav-links      { gap: 12px; }
  .nav-links li:not(:last-child) { display: none; }

  /* Hero */
  #hero           { padding: 90px 20px 56px; }
  .hero-photo-frame { width: 140px; height: 140px; }
  .hero-name      { font-size: clamp(48px, 14vw, 80px); }
  .hero-summary   { font-size: 15px; }
  .hero-scroll-hint { display: none; }

  /* Sections */
  .section-inner  { padding: 64px 20px; }
  .section-title  { font-size: clamp(30px, 8vw, 48px); margin-bottom: 40px; }

  /* Logo strip */
  #logos          { padding: 40px 20px; }
  .logos-track    { gap: 24px 32px; }
  .logo-item img  { height: 20px; }

  /* Bento — single column on small tablets */
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 170px 130px 100px;
    gap: 8px;
  }

  /* Process: single column */
  .process-steps  { grid-template-columns: 1fr; gap: 28px; }

  /* Skills */
  .skills-groups  { grid-template-columns: 1fr 1fr; gap: 28px; }

  /* Contact */
  .contact-sub    { font-size: 14px; }
  .btn-large      { padding: 16px 36px; font-size: 15px; }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
  /* Hero */
  .hero-photo-wrap { display: none; } /* hide photo on tiny screens — name takes priority */

  /* Bento: stack to single column */
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 8px;
  }
  .bento-iphone   { grid-column: 1; grid-row: auto; height: 220px; }
  .bento-code     { grid-column: 1; grid-row: auto; }
  .bento-badge    { grid-column: 1; grid-row: auto; }
  .bento-stat     { grid-column: 1; grid-row: auto; height: 90px; }
  .bento-users    { grid-column: 1; grid-row: auto; height: 90px; }

  /* Shrink iPhone on single column */
  .iphone-frame   { width: 110px; height: 230px; }

  /* Skills */
  .skills-groups  { grid-template-columns: 1fr; }

  /* Nav CTA only */
  .nav-links      { gap: 0; }
}
