/* === Color System === */
:root {
  --ink-900: #0e1a22;
  --primary-900: #1B3C53;
  --primary-800: #234C6A;
  --primary-600: #456882;
  --sand-200: #D2C1B6;

  --bg: linear-gradient(180deg, #0f1620 0%, var(--primary-900) 100%);
  --text: #dfe8f0;
  --muted: #9fb1bf;
  --card: #142836;
  --border: rgba(210,193,182,0.18);
  --glow: rgba(69,104,130,0.45);
  --shadow: rgba(27,60,83,0.5);
}

/* === Base === */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  margin: 0;
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg) fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* === Layout === */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(14,26,34,0.95);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

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

.brand {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: radial-gradient(120px 60px at 20% -10%, var(--sand-200) 0%, transparent 60%),
              linear-gradient(135deg, var(--primary-800), var(--primary-900));
  color: #0b141b;
  font-weight: 800;
  text-decoration: none;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
}

.nav-links {
  display: none; /* hidden on mobile */
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--sand-200);
}

/* === Hero === */
.hero {
  padding: 120px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(100px 80px at 30% 20%, var(--sand-200) 0%, rgba(210,193,182,0.2) 60%, transparent 70%),
              linear-gradient(135deg, var(--primary-600), var(--primary-900));
  box-shadow: 0 16px 50px var(--shadow);
  position: relative;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar .glow {
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  filter: blur(24px);
  background: radial-gradient(circle at 50% 50%, var(--glow), transparent 60%);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tagline-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20,40,54,0.8), rgba(20,40,54,0.35));
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.tagline-card .tiny {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.tagline-card h1 {
  margin: 6px 0 0;
  font-size: 24px;
}

.title {
  font-size: 28px;
  margin: 6px 0 0;
}

.subtitle {
  max-width: 100%;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 0;
}

/* === Buttons === */
.btn,
.btndef{
  display: inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease;
}

.btn.primary,
.btndef.primary {
  background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
}

.btn.ghost {
  background: transparent;
}

.btn:hover,
.btndef:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

/* === Sections === */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 18px;
  color: var(--sand-200);
  margin-bottom: 18px;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20,40,54,0.9), rgba(20,40,54,0.45));
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* === Projects === */
.projects {
  position: relative;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-media {
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(20,40,54,0.9), rgba(20,40,54,0.45));
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: rgba(14,26,34,0.5);
  text-align: center;
  margin-top: 40px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

/* === Larger Screens === */
@media (min-width: 640px) {
  .hero {
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }

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

  .nav-links {
    display: flex;
  }
}

@media (min-width: 960px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .project {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
  }

  .project.alt {
    grid-template-columns: 1fr 1.1fr;
  }
}