/* ─────────────────────────────────────────────────────────────────────────────
   PORTFOLIO — style.css
   Clean, minimal. DM Sans body + DM Mono for code/labels.
───────────────────────────────────────────────────────────────────────────── */

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

:root {
  --bg:         #f9f8f6;
  --surface:    #ffffff;
  --border:     #e5e3de;
  --text:       #1a1917;
  --text-muted: #6b6966;
  --accent:     #1a1917;
  --accent-hover: #3d3b37;
  --tag-bg:     #eeecea;
  --tag-text:   #4a4845;

  --font-sans:  'DM Sans', sans-serif;
  --font-mono:  'DM Mono', monospace;

  --container:  1100px;
  --radius:     6px;
  --radius-lg:  10px;

  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.section       { padding: 7rem 0; }
.section-alt   { background: var(--surface); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 0.6rem;
}

.section-header-row {
  margin-bottom: 3.5rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }

.btn-large { padding: 0.9rem 2.2rem; font-size: 1rem; }

.inline-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  font-size: 0.9rem;
  transition: text-decoration-color 0.15s;
}
.inline-link:hover { text-decoration-color: var(--text); }

/* ── Header / nav ────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s var(--ease), border-bottom 0.3s var(--ease);
}
.site-header.scrolled {
  background: rgba(249, 248, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo .dot { color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle { display: none; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 700px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease) 0.1s forwards;
}

.hero-name {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.2s forwards;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.35s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.5s forwards;
}

.hero-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}

/* ── About ───────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 3rem;
  align-items: start;
}

.section-label-col {
  padding-top: 0.4rem;
}

.about-bio {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
  max-width: 60ch;
}
.about-bio:last-of-type { margin-bottom: 1.8rem; }

.about-links {
  display: flex;
  gap: 1.5rem;
}

/* ── Projects ────────────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
}

.project-card {
  background: var(--surface);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.2s var(--ease);
}
.project-card:hover { background: var(--bg); }

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 3px;
}

.project-links {
  display: flex;
  gap: 0.6rem;
}
.project-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.project-links a:hover { color: var(--text); }

.project-title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.project-stack {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.project-apk-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Skills ──────────────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 3rem;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-list li {
  font-size: 0.95rem;
  color: var(--text);
  padding-left: 0.9rem;
  position: relative;
}
.skill-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--border);
}

/* ── Blog ────────────────────────────────────────────────────────────────── */
.blog-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.blog-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s var(--ease);
}
.blog-item:hover { background: none; }
.blog-item:hover .blog-title a { text-decoration-color: var(--text); }
.blog-item:hover .blog-arrow { opacity: 1; transform: translateX(3px); }

.blog-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.blog-title {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.blog-title a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

.blog-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.blog-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s, transform 0.2s var(--ease);
  text-decoration: none;
}

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact-inner {
  max-width: 520px;
}

.contact-heading {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  margin: 0.5rem 0 1rem;
  line-height: 1.05;
}

.contact-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.2rem;
  max-width: 42ch;
}

.contact-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

/* Scroll-reveal for sections */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 5rem 0; }

  /* Nav */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1.4rem;
  }
  .nav-links.open { display: flex; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.2s var(--ease), opacity 0.2s;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { transform: translateY(-6.5px) rotate(-45deg); }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 1rem; }
  .section-label-col { padding-top: 0; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }

  /* Blog */
  .blog-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .blog-arrow { display: none; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 0.4rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero-name { letter-spacing: -0.03em; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
