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

:root {
  --bg:            #0A0808;
  --bg-card:       #111010;
  --bg-card-hover: #161414;
  --border:        rgba(255, 255, 255, 0.07);
  --border-hover:  rgba(168, 85, 247, 0.5);
  --text:          #F2EDE6;
  --text-muted:    rgba(242, 237, 230, 0.45);
  --accent:        #A855F7;
  --accent-hover:  #B76EF7;
  --accent-glow:   rgba(168, 85, 247, 0.2);
  --font:          'Inter', sans-serif;
  --radius:        16px;
  --max-w:         1200px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── NAV ───────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(10, 8, 8, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }
.nav-cv  { color: var(--text-muted) !important; }
.nav-cta { color: var(--accent) !important; font-weight: 600 !important; }

/* ─── BUTTONS ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

/* ─── SECTION LABELS ────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 52px;
}

/* ─── HERO ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 160px 48px 100px;
  max-width: var(--max-w);
  margin: 0 auto;
  overflow: hidden;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.hero-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.hero-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.hero-title {
  font-size: clamp(60px, 8.5vw, 108px);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 48px;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
  top: -80px; right: -80px;
}
.hero-orb-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  bottom: 40px; left: 160px;
}

/* ─── WORK ──────────────────────────────────────────────────────── */
.work {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px 48px;
  border-top: 1px solid var(--border);
}

.cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.case {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s;
}

.case:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.case-large { grid-column: 1 / -1; }

.case-link-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

/* image area */
.case-image {
  width: 100%;
  overflow: hidden;
  background: #1a1818;
  aspect-ratio: 16/7;
}

.case-large .case-image {
  aspect-ratio: 16/6;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.case:hover .case-image img {
  transform: scale(1.03);
}

/* content area */
.case-content {
  padding: 40px 48px 44px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.case-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  text-transform: uppercase;
}

.tag-year {
  color: var(--accent);
  border-color: rgba(168, 85, 247, 0.35);
}

.case-title {
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.case-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 32px;
  flex: 1;
}

.case-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.case-metrics {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.metric-value {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.metric-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.case-arrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.2s;
}

.case:hover .case-arrow { color: var(--accent); }

.case-glow {
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  bottom: -200px; right: -100px;
  opacity: 0;
  transition: opacity 0.4s;
}

.case:hover .case-glow { opacity: 1; }

/* ─── EXPERIENCE ────────────────────────────────────────────────── */
.experience {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px 48px;
  border-top: 1px solid var(--border);
}

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 48px;
}

.exp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  gap: 24px;
}

.exp-item:first-child { border-top: 1px solid var(--border); }

.exp-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-role {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.exp-company {
  font-size: 13px;
  color: var(--text-muted);
}

.exp-period {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.exp-cv-btn { align-self: flex-start; }

/* ─── SKILLS ────────────────────────────────────────────────────── */
.skills {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px 48px;
  border-top: 1px solid var(--border);
}

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

.skill-item {
  padding: 36px 32px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s, background 0.2s;
}

.skill-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.skill-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.skill-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── CONTACT ───────────────────────────────────────────────────── */
.contact {
  border-top: 1px solid var(--border);
  padding: 120px 48px;
}

.contact-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.contact-title {
  font-size: clamp(52px, 7.5vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-bottom: 64px;
}

.contact-title em {
  font-style: normal;
  color: var(--accent);
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

.contact-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

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

/* ─── FOOTER ────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer span,
.footer a {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a:hover { color: var(--text); }

/* ─── CASE PAGE (shared) ────────────────────────────────────────── */
.case-page-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 160px 48px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 64px;
  transition: color 0.2s;
}

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

.case-page-tags { margin-bottom: 24px; }

.case-page-title {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.case-page-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.65;
  margin-bottom: 64px;
}

.case-page-meta {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 80px;
}

.meta-item {}

.meta-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.meta-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.case-page-image {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 48px;
}

.case-page-image img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.case-page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px 120px;
}

.case-page-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px;
  margin-bottom: 80px;
}

.case-page-metric {
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.case-page-metric .metric-value { font-size: 40px; }

.case-section { margin-bottom: 64px; }

.case-section h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.case-section p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 720px;
}

.case-section p + p { margin-top: 16px; }

.case-page-cta {
  border-top: 1px solid var(--border);
  padding: 80px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.case-page-cta p {
  font-size: 15px;
  color: var(--text-muted);
}

/* ─── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cases { grid-template-columns: 1fr; }
  .case-large { grid-column: auto; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.nav-cta):not(.nav-cv) { display: none; }

  .hero { padding: 120px 24px 80px; }

  .work, .experience, .skills, .contact { padding: 80px 24px; }

  .case-content { padding: 28px 24px 32px; }
  .case-footer { flex-direction: column; align-items: flex-start; gap: 20px; }

  .exp-item { flex-direction: column; align-items: flex-start; gap: 8px; }

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

  .contact-links { flex-direction: column; align-items: flex-start; gap: 20px; }

  .footer { padding: 20px 24px; flex-direction: column; gap: 12px; }

  .case-page-hero, .case-page-image, .case-page-body { padding-left: 24px; padding-right: 24px; }
  .case-page-meta { gap: 32px; }
  .case-page-cta { padding: 60px 24px; flex-direction: column; align-items: flex-start; }

  .hero-3d { display: none; }
}

/* ─── 3D IPHONE ELEMENT ─────────────────────────────────────────── */
@keyframes phone-float {
  0%, 100% { transform: perspective(1100px) rotateY(-22deg) rotateX(7deg) translateY(0px);   }
  50%       { transform: perspective(1100px) rotateY(-18deg) rotateX(5deg) translateY(-20px); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1);    }
  50%       { opacity: 1;   transform: scale(1.06); }
}

.hero-3d {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-52%);
  width: 200px;
  pointer-events: none;
  z-index: 1;
}

/* purple ambient beneath phone */
.phone-ambient {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 100px;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
  filter: blur(24px);
  animation: glow-pulse 5s ease-in-out infinite;
}

/* phone main container — 3D tilt lives here */
.phone {
  width: 200px;
  height: 410px;
  position: relative;
  animation: phone-float 7s ease-in-out infinite;
}

/* ── BODY / FRAME ── */
.phone-body {
  position: absolute;
  inset: 0;
  border-radius: 46px;
  overflow: hidden;

  /* titanium + liquid metal gradient */
  background:
    /* iridescent purple sheen layer */
    linear-gradient(165deg,
      rgba(168, 85, 247, 0.18) 0%,
      rgba(124, 58, 237, 0.06) 25%,
      transparent 50%
    ),
    /* brushed titanium base */
    linear-gradient(-38deg,
      #0e0e18 0%,
      #1c1c2a 7%,
      #282836 14%,
      #383848 21%,
      #d0d0de 27%,   /* main bright highlight */
      #7878 32%,
      #787888 37%,
      #2c2c3c 48%,
      #181820 58%,
      #262634 66%,
      #909098 72%,   /* secondary highlight */
      #363646 80%,
      #131318 100%
    );

  border: 1px solid rgba(255, 255, 255, 0.13);

  box-shadow:
    /* depth shadows */
    28px 40px 80px rgba(0, 0, 0, 0.8),
    10px 14px 30px rgba(0, 0, 0, 0.55),
    /* purple aura */
    -4px 0 40px rgba(168, 85, 247, 0.22),
    0 0 70px rgba(139, 92, 246, 0.12),
    /* frame inner highlight */
    inset 1px 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 20px rgba(0, 0, 0, 0.4);
}

/* ── EDGE FACE — left side slice visible at angle ── */
.phone-edge {
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: -13px;
  width: 14px;
  background: linear-gradient(to right, #06060c, #161622, #0e0e18);
  border-radius: 8px 0 0 8px;
  box-shadow: -4px 0 14px rgba(0, 0, 0, 0.6);
}

/* side action button */
.phone-edge::after {
  content: '';
  position: absolute;
  top: 28%;
  left: 1px;
  width: 3px;
  height: 52px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #1a1a28, #2e2e3e, #1a1a28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ── SCREEN ── */
.phone-screen {
  position: absolute;
  inset: 11px;
  border-radius: 36px;
  background: #05050d;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 40px rgba(139, 92, 246, 0.15),
    inset 0 0 80px rgba(0, 0, 0, 0.6);
}

/* Dynamic Island */
.phone-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 2px 8px rgba(0,0,0,0.8);
  z-index: 2;
}

/* ambient screen glow */
.phone-screen-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(139, 92, 246, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(168, 85, 247, 0.12) 0%, transparent 50%);
}

/* fake UI — abstract lines simulating app content */
.phone-ui {
  position: absolute;
  inset: 58px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ui-pill {
  width: 60%;
  height: 10px;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.35);
}

.ui-row {
  display: flex;
  gap: 8px;
  margin: 4px 0;
}

.ui-card {
  flex: 1;
  height: 64px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ui-card:first-child {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.2);
}

.ui-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.ui-line {
  height: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.ui-line-short  { width: 55%; }
.ui-line-medium { width: 75%; }

/* glass reflection overlay on screen */
.phone-glass-shine {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  border-radius: 36px 36px 60% 60%;
  background: linear-gradient(
    170deg,
    rgba(255, 255, 255, 0.055) 0%,
    rgba(255, 255, 255, 0.01)  45%,
    transparent 60%
  );
  pointer-events: none;
}

/* ── VOLUME SIDE BUTTONS (left edge) ── */
.phone-btn {
  position: absolute;
  left: -15px;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(to right, #1e1e2c, #2e2e3e);
  box-shadow: -1px 0 4px rgba(0,0,0,0.5);
}

.phone-btn-1 { top: 26%;  height: 36px; }
.phone-btn-2 { top: 38%;  height: 36px; }

/* ── BOTTOM SHADOW ── */
.phone-shadow-bottom {
  position: absolute;
  bottom: -28px;
  left: 10%;
  right: 10%;
  height: 28px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.55) 0%, transparent 75%);
  filter: blur(8px);
}
