/* ============================================================
   Prem Kumar M — Portfolio Stylesheet
   Mobile-First Architecture & Design System
   ============================================================= */

:root {
  --bg: #0d0d0f;
  --panel: #17171a;
  --panel-hover: #1f1f24;
  --ink: #f4f0e6;
  --ink-dim: #9a968c;
  --line: #2c2a26;
  --amber: #e3a857;
  --amber-glow: rgba(227, 168, 87, 0.18);
  --amber-dark: #b88235;
  --success: #4cd964;
  --radius: 12px;
  --radius-sm: 6px;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-mono: 'IBM Plex Mono', monospace;
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* ---------- Layout Wrapper ---------- */
.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Mobile-First Hero Section ---------- */
header.hero {
  min-height: calc(100vh - 60px);
  padding: 36px 0 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-sizing: border-box;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: auto 0;
  padding: 20px 0;
}

.hero-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.timecode {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--amber);
  white-space: nowrap;
}

/* Avatar Badge Styling */
.hero-avatar-wrap {
  position: relative;
  margin-bottom: 24px;
  display: inline-block;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--amber);
  box-shadow: 0 0 28px var(--amber-glow);
  display: block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.hero-avatar-wrap:hover .hero-avatar {
  transform: scale(1.06);
  box-shadow: 0 0 36px rgba(227, 168, 87, 0.35);
}

.avatar-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background-color: var(--amber);
  border: 2px solid var(--bg);
  border-radius: 50%;
}

/* Hero Typography */
h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 8vw, 68px);
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.role {
  font-size: 14px;
  color: var(--ink-dim);
  margin: 0 0 32px;
  max-width: 58ch;
  line-height: 1.65;
}

.role em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--ink);
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-dim);
  width: 100%;
  max-width: 640px;
  background: var(--panel);
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  text-align: center;
  margin-bottom: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  color: var(--amber);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Scroll CTA Button */
.hero-scroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--amber);
  text-decoration: none;
  background: rgba(227, 168, 87, 0.08);
  border: 1px solid rgba(227, 168, 87, 0.25);
  padding: 10px 20px;
  border-radius: 30px;
  transition: all 0.25s ease;
  margin-top: 16px;
}

.hero-scroll-btn:hover {
  background: var(--amber);
  color: var(--bg);
  border-color: var(--amber);
  transform: translateY(2px);
}

.hero-scroll-btn svg {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(4px);
  }
  60% {
    transform: translateY(2px);
  }
}

/* ---------- Sprocket Divider ---------- */
.sprocket-wrap {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.sprocket {
  display: block;
  width: 100%;
  height: 20px;
  margin: 0;
}

/* ---------- Section Standard ---------- */
.section {
  padding: 44px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
  gap: 16px;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0;
}

.section-head .count {
  font-size: 12px;
  color: var(--ink-dim);
}

/* ---------- Mobile-First Work Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.reel {
  background: var(--panel);
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.reel:hover {
  border-color: rgba(227, 168, 87, 0.4);
}

.reel-cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

.reel-cap .idx {
  color: var(--amber);
  font-weight: 500;
}

.embed-slot {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 400px;
  background: #000;
  border-radius: 4px;
}

.instagram-media {
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.fallback {
  width: 100%;
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}

.fallback p {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.fallback a {
  display: inline-block;
  font-size: 12px;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
  padding-bottom: 2px;
}

.fallback a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- Disclaimer Notice ---------- */
.disclaimer {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-dim);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.disclaimer .mark {
  color: var(--amber);
}

/* ---------- Footer & Contact Links ---------- */
footer {
  padding: 40px 0 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-dim);
  border-top: 1px solid var(--line);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--panel);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.contact-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-label {
  font-size: 11px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 60px;
}

.contact-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
  transition: color 0.2s, border-color 0.2s;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* Copy Email Button */
.copy-btn {
  background: rgba(227, 168, 87, 0.1);
  border: 1px solid rgba(227, 168, 87, 0.3);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
  min-height: 36px;
}

.copy-btn:hover {
  background: var(--amber);
  color: var(--bg);
  border-color: var(--amber);
}

.copy-btn:active {
  transform: scale(0.96);
}

.copy-btn.copied {
  background: var(--success);
  color: #000;
  border-color: var(--success);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-dim);
}

/* ---------- Focus & Motion Controls ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  header.hero {
    animation: rise 0.6s ease-out;
  }
}

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

/* ============================================================
   Media Queries: Tablet & Desktop Responsive Scaling
   ============================================================= */

@media (min-width: 640px) {
  .wrap {
    padding: 0 28px;
  }

  header.hero {
    padding: 72px 0 48px;
    align-items: flex-start;
    text-align: left;
  }

  .hero-avatar {
    width: 130px;
    height: 130px;
  }

  .meta-row {
    flex-direction: row;
    gap: 24px;
    padding: 16px 20px;
  }

  .meta-item {
    flex: 1;
  }

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

  footer {
    padding: 48px 0 80px;
  }

  .contact-card {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 960px) {
  header.hero {
    padding: 88px 0 56px;
  }

  .hero-avatar {
    width: 140px;
    height: 140px;
  }

  .section-head h2 {
    font-size: 28px;
  }
}
