:root {
  --bg: #0f172a;
  --bg-alt: #f3f4f6;
  --accent: #0ea5e9;
  --text: #0f172a;
  --muted: #6b7280;
  --white: #ffffff;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
  --max-width: 1120px;
  --transition: 0.2s ease-in-out;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: #ffffff;
}

/* Layout */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section.alt {
  background: var(--bg-alt);
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--bg);
}

p {
  line-height: 1.6;
}

/* Top navigation */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  color: var(--white);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
}

.logo {
  display: flex;
  flex-direction: column;
  font-weight: 600;
}

.logo-main {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.logo-sub {
  font-size: 0.8rem;
  opacity: 0.8;
}

nav a {
  color: var(--white);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.85;
  transition: opacity var(--transition);
}

nav a:hover {
  opacity: 1;
}

/* Hero */

.hero {
  background: radial-gradient(circle at top left, #0ea5e9 0, #0f172a 45%, #020617 100%);
  color: var(--white);
  padding: 4.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: 2.3rem;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.05rem;
  max-width: 34rem;
}

.hero-actions {
  margin: 1.8rem 0 1.2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.meta {
  font-size: 0.9rem;
  opacity: 0.9;
}

.hero-card {
  background: rgba(15, 23, 42, 0.92);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #e5e7eb;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-card li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn.primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 16px 30px rgba(14, 165, 233, 0.45);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(14, 165, 233, 0.6);
}

.btn.ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(148, 163, 184, 0.8);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.5);
}

.btn.full {
  width: 100%;
}

/* Cards & grids */

.grid-3 {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 2rem;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.contact-list li {
  margin-bottom: 0.4rem;
}

/* Form */

form {
  display: grid;
  gap: 0.9rem;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  display: grid;
  gap: 0.25rem;
}

input,
select,
textarea {
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  padding: 0.6rem 0.75rem;
  font: inherit;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Footer */

.footer {
  background: #020617;
  color: #cbd5f5;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer a {
  color: #e5e7eb;
  text-decoration: none;
}

/* Responsive */

@media (max-width: 900px) {
  .hero-grid,
  .grid-3,
  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  nav a {
    margin-left: 0.9rem;
  }

  .hero {
    padding-top: 4rem;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Logo / brand in header */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 52px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

/* Portfolio section */
.section.portfolio {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.portfolio-item {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.portfolio-item img {
  width: 100%;
  border-radius: 6px;
  display: block;
  margin-bottom: 0.75rem;
}

.portfolio-item h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.1rem;
}

.portfolio-item p {
  margin: 0;
  font-size: 0.95rem;
}

.project-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.project-hero img {
  width: 100%;
  display: block;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.project-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-thumbs img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  object-fit: cover;
}

/* reuse your existing .btn & .btn.ghost styles */
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

