/*
	styles.css — simple, extendable structure
	Sections:
		1) CSS variables / theme
		2) Base / reset
		3) Layout & containers
		4) Components (header, buttons, cards)
		5) Utilities & responsiveness
*/

/* 1) Variables (light & dark tokens) */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --glass: rgba(15, 23, 42, 0.04);
  --radius: 10px;
  --container-width: 1100px;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --card: #0f172a;
  --text: #e6eef8;
  --muted: #9aa7b2;
  --accent: #60a5fa;
  --accent-2: #34d399;
  --glass: rgba(255, 255, 255, 0.03);
}

/* 2) Base / reset */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* 3) Layout */
.site-header {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.02));
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand {
  padding-left: 8px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}
.nav a {
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
}
.nav a:hover {
  color: var(--text);
  background: var(--glass);
}

.hero {
  padding: 3.5rem 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: center;
}
.avatar {
  /* size avatar responsively: min 140px, ideal 18vw, max 280px */
  width: clamp(140px, 18vw, 280px);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.2);
  display: block;
}
.hero-copy h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
}
.lead {
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.meta {
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

/* 4) Components */
.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 0;
  font-weight: 600;
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.12);
}
.btn-ghost {
  background: transparent;
  border: 0;
  font-size: 1.1rem;
}

.section {
  padding: 2.25rem 0;
}
.timeline {
  padding-left: 1rem;
}
.job {
  margin-bottom: 1rem;
}

/* Tag / badge component */
.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--card);
}

/* rusty/banner style reminiscent of old HTML banners */
.tag--rusty {
  background: linear-gradient(135deg, #8B4513 0%, #C76114 40%, #F59E0B 100%);
  box-shadow: 0 2px 0 rgba(0,0,0,0.18), inset 0 -6px 18px rgba(255,255,255,0.04);
  border: 1px solid rgba(0,0,0,0.18);
  letter-spacing: 0.02em;
}

/* make sure rusty tag looks good in dark mode */
[data-theme="dark"] .tag--rusty {
  background: linear-gradient(135deg, #6B3E1A 0%, #A0440F 40%, #D97706 100%);
  border: 1px solid rgba(255,255,255,0.06);
}
.job-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
/* Project media (videos/screenshots) */
.project-media {
  margin: 0 0 0.75rem;
}
.media-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.02));
}
.media-wrap video,
.media-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* images should cover the area, but videos often need to be fully visible -> use contain */
.media-wrap img {
  object-fit: contain;
  object-position: center;
}
.media-wrap video {
  object-fit: contain;
  object-position: center;
  background: #000; /* letterbox color when aspect ratios differ */
}
}
.project-card {
  background: var(--card);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
}
.project-card h3 {
  margin: 0.75rem 0 0.25rem;
}

.site-footer {
  padding: 1rem 0;
  color: var(--muted);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* 5) Utilities & responsiveness */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    text-align: center;
  }
  .hero-card {
    order: -1;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .nav ul {
    display: none;
  }
}

/* mid-size screens: prevent avatar from exploding on tablets / small laptops */
@media (max-width: 1024px) and (min-width: 601px) {
  /* use clamp for the left column so it scales smoothly on mid-size screens */
  .hero-grid{
    grid-template-columns: clamp(160px, 20vw, 220px) 1fr;
    gap: 1.25rem;
  }
  .avatar{
    margin: 0 auto;
  }
  .hero-copy h1{font-size:1.75rem}
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* small helper classes */
.muted {
  color: var(--muted);
}
