/* Base theme (default: light) */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0284c7;
  --accent-2: #0ea5e9;
  --border: #e2e8f0;
  --shadow: 0 18px 40px rgba(2, 6, 23, 0.10);
}

/* Respect OS dark mode preference */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #111827;
    --surface-2: #0b1220;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #38bdf8;
    --accent-2: #0ea5e9;
    --border: #1f2937;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  }
}

/* Reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 700px at 10% -10%, #0b1b3a 0%, var(--bg) 45%);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

header h1 {
  margin: 0;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a {
  color: var(--muted);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  transition: color 160ms ease, background-color 160ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 40px;
}

.hero-card,
.image-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-card {
  background-color: var(--surface);
}

.hero-card h2 {
  margin: 0 0 16px;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: 0.2px;
}

.hero-card p {
  margin: 0 0 24px;
  color: var(--text);
  opacity: 0.92;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: stretch;
}

.contact-details p {
  margin: 0 0 16px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-links svg {
  flex: 0 0 auto;
}

.contact-image {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
}

.contact-image img {
  height: auto;
  width: auto;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 120ms ease, background-color 160ms ease, border-color 160ms ease;
}

.actions a:first-child {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
}

.actions a:first-child:hover,
.actions a:first-child:focus-visible {
  transform: translateY(-1px);
}

.actions a:last-child {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.actions a:last-child:hover,
.actions a:last-child:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.actions a.game-button {
  background: linear-gradient(135deg, #ff00ff, #ffea00 55%, #00e5ff);
  color: #111;
  border: 3px solid #ffffff;
  padding: 20px 28px;
  font-size: clamp(28px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.15),
    0 12px 30px rgba(255, 0, 255, 0.35);
}

.actions a.game-button:hover,
.actions a.game-button:focus-visible {
  transform: translateY(-2px) scale(1.02) rotate(-0.5deg);
  border-color: #111;
}

.project {
  margin: 8px 0 28px;
}

.project-title {
  margin: 0 0 16px;
  min-height: 2.5em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  font-family: Manrope, Inter, system-ui, sans-serif;
}

.project-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.project-text {
  flex: 1 1 320px;
}

.project-image {
  width: 220px;
  height: 240px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.image-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-2);
  padding: 18px;
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
}

footer {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Responsive */
@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-image {
    justify-content: flex-start;
  }

  .contact-image img {
    height: auto;
    width: min(100%, 360px);
    max-width: none;
  }

  .image-card {
    min-height: 320px;
  }

  .project-content {
    flex-direction: column;
    align-items: stretch;
  }

  .project-image {
    height: auto;
    max-height: 320px;
    width: 100%;
    object-fit: cover;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 28px 18px 44px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 28px;
  }

  nav {
    gap: 10px;
    flex-wrap: wrap;
  }
}
