/* Portfolio — dark theme with warm accent */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --bg: #0c0c0c;
  --bg-soft: #141414;
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #e07c4c;
  --accent-hover: #f09368;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --transition: 0.25s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle gradient orbs in background */
body::before {
  content: '';
  position: fixed;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(224, 124, 76, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(224, 124, 76, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 a {
  color: var(--text);
  text-decoration: none;
}

h1 a:hover {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

nav a:hover {
  color: var(--accent);
}

main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.hero {
  margin-bottom: 5rem;
  padding: 2rem 0;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 36ch;
  margin-top: 0.5rem;
}

section {
  margin-bottom: 4rem;
}

section h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
  color: var(--text);
}

section h2::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

section p {
  color: var(--text-muted);
  max-width: 55ch;
}

/* Experience section */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.experience-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.experience-card:hover {
  border-color: rgba(224, 124, 76, 0.3);
  transform: translateY(-2px);
}

.experience-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.experience-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.experience-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.experience-company {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.experience-bullets {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.experience-bullets li {
  margin-bottom: 0.35rem;
}

.experience-bullets li:last-child {
  margin-bottom: 0;
}

/* Project flip cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-flip-card {
  perspective: 1000px;
  min-height: 200px;
  cursor: pointer;
  outline: none;
}

.project-flip-card:focus-visible .project-flip-inner {
  box-shadow: 0 0 0 2px var(--accent);
}

.project-flip-inner {
  position: relative;
  width: 100%;
  min-height: 200px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius);
}

.project-flip-card.flipped .project-flip-inner {
  transform: rotateY(180deg);
}

.project-flip-front,
.project-flip-back {
  position: absolute;
  width: 100%;
  min-height: 200px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color var(--transition);
}

.project-flip-card:hover .project-flip-front,
.project-flip-card:hover .project-flip-back {
  border-color: rgba(224, 124, 76, 0.3);
}

.project-flip-front {
  background: var(--bg-soft);
}

.project-flip-back {
  background: var(--bg-soft);
  transform: rotateY(180deg);
  justify-content: flex-start;
  overflow-y: auto;
}

.project-flip-front h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.flip-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.project-flip-back .project-what {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.project-flip-back .project-tools {
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0;
  line-height: 1.5;
}

.project-flip-back .project-tools strong {
  color: var(--text);
  font-weight: 600;
}

/* Contact section */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.contact-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  header {
    padding: 1rem;
  }

  .header-inner {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  nav {
    gap: 1.25rem;
  }

  main {
    padding: 2rem 1rem 4rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  section h2 {
    font-size: 1.6rem;
  }
}
