/* ============================================================
   Yogendra Marasini — portfolio
   Design system: terraced hillside (Gulmi) x developer terminal
   ============================================================ */

:root {
  /* color */
  --bg-deep: #14231b;
  --bg-ridge: #1e3327;
  --bg-paper: #f2e9d4;
  --bg-paper-alt: #ece0c4;
  --ink-light: #f2ead6;
  --ink-light-dim: #cfc6ac;
  --ink-dark: #17241b;
  --ink-dark-dim: #4a5347;
  --gold: #e0a83f;
  --gold-dim: #7c5f27;
  --moss: #7fa07e;
  --maroon: #8c2e3b;
  --line-dark: rgba(242, 234, 214, 0.14);
  --line-light: rgba(23, 36, 27, 0.12);

  /* type */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 14px;
  --wrap: 1120px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.4em; line-height: 1.1; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--ink-dark); padding: 10px 16px;
  z-index: 200; border-radius: 0 0 8px 0; font-family: var(--font-mono); font-size: 0.85rem;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- buttons & tags ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--gold); color: var(--ink-dark); }
.btn-solid:hover { background: #ecb857; }
.btn-ghost { border-color: var(--line-dark); color: var(--ink-light); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
section.work .btn-ghost, .about .btn-ghost { border-color: var(--line-light); color: var(--ink-dark); }

.eyebrow {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.78rem; color: var(--gold); margin: 0 0 14px;
}
.eyebrow-dark { color: var(--maroon); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tags li {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-light);
  color: var(--ink-dark-dim);
}
.tags-lg li { font-size: 0.8rem; padding: 8px 16px; border-color: var(--line-dark); color: var(--ink-light-dim); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 35, 27, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }

.site-nav { display: flex; gap: 28px; font-size: 0.92rem; }
.site-nav a { opacity: 0.85; transition: opacity 0.15s ease; }
.site-nav a:hover { opacity: 1; color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cta-desktop { padding: 9px 18px; font-size: 0.82rem; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink-light); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px; padding: 6px 24px 20px;
  border-top: 1px solid var(--line-dark);
}
.mobile-nav a { padding: 12px 4px; font-size: 0.98rem; border-bottom: 1px solid var(--line-dark); }
.mobile-nav .btn { margin-top: 14px; justify-content: center; }
.mobile-nav.open { display: flex; }

@media (max-width: 780px) {
  .site-nav, .cta-desktop { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 84px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; padding-bottom: 90px; }
.hero-lead { font-size: 1.08rem; color: var(--ink-light-dim); max-width: 46ch; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.01em; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.terminal {
  background: #0e1913; border: 1px solid var(--line-dark); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55);
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #111f18; border-bottom: 1px solid var(--line-dark); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-a { background: #e0645f; } .dot-b { background: #e0b23f; } .dot-c { background: #6fae6c; }
.terminal-title { margin-left: 8px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-light-dim); }
.terminal-body {
  margin: 0; padding: 20px 18px 26px; font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.75;
  color: var(--moss); white-space: pre-wrap; word-break: break-word; min-height: 220px;
}
.terminal-body .prompt { color: var(--gold); }
.terminal-body .out { color: var(--ink-light-dim); }
.terminal-body .ok { color: #8fc98c; }
.terminal-body .cursor { display: inline-block; width: 8px; height: 1em; background: var(--gold); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* terrace dividers */
.terrace { line-height: 0; }
.terrace svg { width: 100%; height: 60px; display: block; }
.terrace-down svg path { fill: var(--bg-paper); }
.terrace-down { background: var(--bg-deep); }
.terrace-up svg path { fill: var(--bg-deep); }
.terrace-up { background: var(--bg-paper); }
.about .terrace-down { background: var(--bg-paper); }
.about .terrace-down svg path { fill: var(--bg-deep); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 60px; }
  .hero-visual { order: -1; }
}

/* ---------- work ---------- */
.work { background: var(--bg-paper); color: var(--ink-dark); padding: 90px 0 0; }
.work h2, .about h2, .contact h2, .process h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.work h2 { color: var(--ink-dark); }
.section-lead { color: var(--ink-dark-dim); max-width: 56ch; font-size: 1.02rem; }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: 40px; }
.card {
  background: #fffdf6; border: 1px solid var(--line-light); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(23,36,27,0.25); }

.browser-chrome { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #efe4c9; border-bottom: 1px solid var(--line-light); }
.browser-url { margin-left: 8px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-dark-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-art { aspect-ratio: 16 / 9; }
.art-bg { fill: #efe4c9; }
.art-bg-alt { fill: #f2ecd9; }
.art-fold-a { fill: var(--maroon); opacity: 0.85; }
.art-fold-b { fill: var(--gold); opacity: 0.85; }
.art-dot { fill: var(--gold); opacity: 0.7; }
.art-dot-orange { fill: var(--gold); }
.art-bottle { fill: var(--moss); }
.art-bottle-neck { fill: var(--ink-dark-dim); }
.art-drop { fill: var(--maroon); }
.art-hanger-hook { fill: none; stroke: var(--ink-dark-dim); stroke-width: 4; stroke-linecap: round; }
.art-garment { fill: var(--maroon); opacity: 0.88; }
.art-cylinder { fill: var(--moss); }
.art-cylinder-cap { fill: var(--ink-dark-dim); }
.art-appliance { fill: var(--gold); opacity: 0.85; }
.art-appliance-dial { fill: #fffdf6; }
.art-terrace-1 { fill: #93b18f; }
.art-terrace-2 { fill: #7fa07e; }
.art-terrace-3 { fill: #67926a; }

.card-body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.18rem; margin-bottom: 8px; }
.card-body p { color: var(--ink-dark-dim); font-size: 0.94rem; flex: 1; }
.card-link { margin-top: auto; font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; color: var(--maroon); }
.card-link:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------- process ---------- */
.process { background: var(--bg-deep); padding: 90px 0 100px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin: 44px 0 60px; padding: 0; counter-reset: none; }
.steps li { border-top: 1px solid var(--line-dark); padding-top: 18px; }
.step-num { font-family: var(--font-mono); color: var(--gold); font-size: 0.85rem; }
.steps h3 { font-size: 1.05rem; margin-top: 10px; }
.steps p { color: var(--ink-light-dim); font-size: 0.92rem; }

.skills-label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-light-dim); margin-bottom: 4px; }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- about ---------- */
.about { background: var(--bg-paper); color: var(--ink-dark); padding: 90px 0 0; }
.about-grid { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: center; padding-bottom: 90px; }
.about-badge { position: relative; }
.about-badge svg { width: 100%; }
.about-photo { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; border: 3px solid var(--maroon); }
.about-fallback { display: none; }
.about-photo.loaded { display: block; }
.badge-ring { fill: none; stroke: var(--maroon); stroke-width: 3; }
.badge-text { font-family: var(--font-display); font-size: 58px; fill: var(--maroon); font-weight: 600; }
.about h2 { color: var(--ink-dark); }
.about-copy p { color: var(--ink-dark-dim); max-width: 62ch; }
.about-meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--gold-dim); margin-top: 20px; }

@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-badge { width: 140px; margin: 0 auto; }
  .about-copy p { margin-left: auto; margin-right: auto; }
}

/* ---------- contact ---------- */
.contact { background: var(--bg-deep); padding: 90px 0 90px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; }
.contact h2 { color: var(--ink-light); }
.contact-intro p { color: var(--ink-light-dim); max-width: 46ch; }
.contact-list { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line-dark); padding-top: 12px; }
.contact-label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-light-dim); }
.contact-list a { color: var(--gold); font-size: 1rem; }
.contact-list a:hover { text-decoration: underline; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-light-dim); }
.field input, .field textarea {
  background: #0e1913; border: 1px solid var(--line-dark); border-radius: 8px; color: var(--ink-light);
  padding: 12px 14px; font-family: var(--font-body); font-size: 0.95rem; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); outline: none; }
.contact-form .btn { align-self: flex-start; }
.form-note { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-light-dim); margin: 2px 0 0; }

@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.site-footer { background: #0e1913; padding: 46px 0; border-top: 1px solid var(--line-dark); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-tagline { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-light-dim); margin: 8px 0 0; }
.footer-nav { display: flex; gap: 20px; font-size: 0.9rem; align-self: center; }
.footer-nav a:hover { color: var(--gold); }
.footer-contact { text-align: right; font-size: 0.86rem; color: var(--ink-light-dim); }
.footer-contact a { color: var(--gold); }
.footer-contact p { margin: 6px 0 0; font-family: var(--font-mono); font-size: 0.74rem; }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-contact { text-align: center; }
  .footer-nav { justify-content: center; flex-wrap: wrap; }
}
