/* ===========================================================
   Samarth Sarin — portfolio
   Single source of truth for site styling.
   Theme: warm amber accent on a soft charcoal dark background.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0e0e12;
  --surface: #15151c;
  --surface-2: #1a1a22;
  --border: #26262f;
  --text: #e9e9ee;
  --muted: #9a9aa6;
  --faint: #7a7a86;
  --accent: #e0a32e;          /* warm amber */
  --accent-strong: #f0b84a;
  --accent-soft: rgba(224, 163, 46, 0.14);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); }

/* ---------- Navigation ---------- */
ul {
  list-style: none;
  margin: 0;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  background: rgba(14, 14, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

li { list-style: none; }

li a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 16px 18px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

li a:hover { color: var(--text); }

li a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 48px 0 18px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px auto;
  max-width: 820px;
}

/* ---------- Hero (home) ---------- */
.hero {
  text-align: center;
  padding: 64px 24px 8px;
  animation: fadeUp 0.7s ease both;
}

.role-label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.line {
  font-family: var(--font);
  color: var(--text);
  font-weight: 600;
  font-size: clamp(34px, 6vw, 46px);
  letter-spacing: 0.5px;
  text-align: center;
  margin: 0 auto 10px;
  line-height: 1.1;
}

#typed-name { color: var(--text); }

.caret {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: -0.06em;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* legacy typewriter class — keep harmless, just fade in */
.anim-typewriter { animation: fadeUp 0.8s ease both; }

.subtitle {
  color: var(--muted);
  font-size: 16px;
  max-width: 460px;
  margin: 0 auto;
}

/* white bars around the name — classic skin only */
.hero-rule { display: none; }

.img1 {
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-top: 8px;
  animation: fadeUp 0.8s ease both;
}

.avatar {
  width: min(240px, 62vw);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  animation: fadeUp 0.8s ease both;
}

/* modern shows the recent photo; classic shows the original */
.avatar-classic { display: none; }
.avatar-modern { object-position: 14% 50%; }

.img2 {
  width: 38%;
  max-width: 260px;
  opacity: 0.9;
  animation: fadeUp 0.9s ease both;
}

/* ---------- Headings ---------- */
h1 {
  font-family: var(--font);
  color: var(--text);
  font-weight: 600;
  font-size: 28px;
}

h2 {
  font-family: var(--font);
  color: var(--text);
  font-weight: 500;
  font-size: clamp(22px, 4vw, 28px);
  text-align: center;
  margin: 40px 0 18px;
  padding: 0;
}

.aboutme { font-size: clamp(26px, 5vw, 34px); }

/* ---------- Social icons ---------- */
.socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 28px 0;
}

.fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  font-size: 22px;
  text-decoration: none;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

/* higher specificity so it wins over Font Awesome's own .fa{display:inline-block} */
.socials .fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.fa:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  opacity: 1;
}

/* ---------- Experience cards ---------- */
.exp {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
  text-align: left;
  animation: fadeUp 0.6s ease both;
  transition: border-color 0.2s ease;
}

.exp:hover { border-color: var(--accent); }

.exp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

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

.exp-role .company { color: var(--accent); }

.exp-date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
  white-space: nowrap;
}

.exp-loc {
  font-size: 13.5px;
  color: var(--faint);
  margin-top: 2px;
}

.exp-points {
  display: block;
  background: none;
  position: static;
  border: none;
  list-style: disc;
  margin: 14px 0 0;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
}

.exp-points li {
  list-style: disc;
  margin-bottom: 8px;
}

.exp-points li::marker { color: var(--accent); }

/* ---------- Skills ---------- */
.skill-group {
  margin-bottom: 24px;
}

.skill-cat {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
}

/* ---------- About / paragraphs ---------- */
p {
  font-family: var(--font);
  color: var(--muted);
  padding: 0;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 24px auto;
  max-width: 700px;
  text-align: left;
}

.p1 {
  font-family: var(--font);
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Music ---------- */
.container { position: relative; text-align: center; }

.guitarpic { max-width: 600px; padding: 0; margin: 24px auto 0; display: block; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  border-radius: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.btn:hover { border-color: var(--accent); transform: translateY(-2px); opacity: 1; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  padding: 48px 24px 40px;
}

/* ---------- Pepakura page ---------- */
.intro-grid {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.intro-grid .copy { flex: 1 1 340px; text-align: left; }
.intro-grid img { height: 84px; width: auto; }

.mySlides {
  display: none;
  margin: 0 auto;
  max-width: 600px;
}

.mySlides img { border-radius: 12px; border: 1px solid var(--border); }

.cursor { cursor: pointer; }

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 45%;
  width: auto;
  padding: 14px 18px;
  margin-top: -22px;
  color: var(--text);
  font-weight: bold;
  font-size: 22px;
  border-radius: 10px;
  background: rgba(20, 20, 28, 0.6);
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.2s ease;
}

.next { right: 16px; }
.prev { left: 16px; }
.prev:hover, .next:hover { background: var(--accent); color: #1a1306; }

.numbertext {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

.caption-container {
  text-align: center;
  font-family: var(--font);
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 600px;
  margin: 16px auto 0;
  padding: 0 16px;
}

.column img { border-radius: 8px; }

.demo { opacity: 0.5; transition: opacity 0.2s ease; }
.demo.active, .demo:hover { opacity: 1; }

/* ---------- Theme toggle button ---------- */
#theme-toggle {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 200;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

#theme-toggle:hover { background: var(--accent-soft); transform: translateY(-2px); }

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .exp-head { flex-direction: column; }
  .row { grid-template-columns: repeat(3, 1fr); }
}
