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

:root {
  --color-bg: #0f1115;
  --color-bg-alt: #161a21;
  --color-text: #e5e7eb;
  --color-text-muted: #9aa3b2;
  --color-border: #272c35;
  --color-primary: #3b82f6;
  --color-primary-dark: #60a5fa;
  --color-accent: #f8fafc;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

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

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 100px;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  text-align: center;
}

.eyebrow {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  text-align:left;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 600px;
}

/* ---------- Portfolio Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.card {
  display: flex;
  flex-direction: row;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-media {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.card-media img {
  width: 100%;
  max-width: 96px;
}

.card-body {
  flex: 1;
  padding: 16px;
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-body p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  background: rgba(59, 130, 246, 0.15);
  padding: 4px 10px;
  border-radius: 999px;
}

.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}

/* ---------- Photo Gallery ---------- */
.gallery-subtitle {
  max-width: 800px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.gallery-media {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
}

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

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
}

/* ---------- Timeline (Work History) ---------- */
.timeline {
  position: relative;
  max-width: 760px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-left: 36px;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-bg-alt);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.timeline-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.timeline-company {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.timeline-content p:last-child {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.contact-item a {
  font-weight: 600;
  color: var(--color-primary);
}

.contact-item a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  font-weight: 600;
  color: var(--color-primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--color-bg-alt);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-row input,
.form-row textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.contact-form .btn {
  align-self: flex-start;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-attributions {
  margin-top: 16px;
}

.footer-attributions-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.footer-attributions-list {
  list-style: none;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav {
    gap: 18px;
  }

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

  .hero {
    padding: 90px 0 70px;
  }

  .section {
    padding: 72px 0;
  }

  .card {
    flex-direction: column;
  }

  .card-media {
    flex: 0 0 160px;
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
