/* ========================================
   David Petrea Portfolio - Shared Styles
   ======================================== */

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

:root {
  --bg-dark: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --bg-card: #21262d;
  --atlantic-blue: #0ea5e9;
  --atlantic-blue-dark: #0284c7;
  --atlantic-blue-light: #38bdf8;
  --white: #ffffff;
  --off-white: #e6edf3;
  --gray: #7d8590;
  --gray-light: #c9d1d9;
  --border-subtle: rgba(14, 165, 233, 0.1);
  --border-accent: rgba(14, 165, 233, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-accent: 0 8px 30px rgba(14, 165, 233, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--off-white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
  color: var(--gray-light);
  font-size: 1rem;
  line-height: 1.7;
}

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

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

/* Background Grid */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-dark);
  background-image: 
    linear-gradient(rgba(14, 165, 233, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.bg-grid::before,
.bg-grid::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.1;
  pointer-events: none;
}

.bg-grid::before {
  top: -150px;
  right: -150px;
  background: var(--atlantic-blue);
}

.bg-grid::after {
  bottom: -150px;
  left: -150px;
  background: var(--atlantic-blue-dark);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.9rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  transition: color 0.3s;
}

.nav-logo:hover {
  color: var(--atlantic-blue);
}

.nav-social {
  display: flex;
  gap: 0.4rem;
}

.nav-social a {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  color: var(--gray-light);
  font-size: 0.85rem;
  transition: all 0.3s;
}

.nav-social a:hover {
  background: var(--atlantic-blue);
  border-color: var(--atlantic-blue);
  color: var(--white);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.3rem;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--gray-light);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--atlantic-blue);
  background: rgba(14, 165, 233, 0.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  color: var(--gray-light);
  cursor: pointer;
  font-size: 1.1rem;
}

/* Mobile Navigation */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.98);
    flex-direction: column;
    padding: 1rem;
    gap: 0.3rem;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu a {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 640px) {
  .nav-social {
    display: none;
  }
}

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

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  color: var(--atlantic-blue);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.6rem;
}

.section-header h2 {
  margin-bottom: 0.6rem;
}

.section-header p {
  max-width: 600px;
  color: var(--gray);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-content {
  max-width: 650px;
}

.hero-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--atlantic-blue);
  margin-bottom: 0.8rem;
}

.hero h1 {
  background: linear-gradient(135deg, var(--white) 0%, var(--atlantic-blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--gray-light);
  margin-bottom: 1.2rem;
  font-weight: 400;
}

.hero-description {
  color: var(--gray);
  max-width: 520px;
  margin-bottom: 2rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--atlantic-blue);
  color: var(--white);
  border-color: var(--atlantic-blue);
}

.btn-primary:hover {
  background: transparent;
  color: var(--atlantic-blue);
  box-shadow: var(--shadow-accent);
}

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

.btn-secondary:hover {
  background: var(--atlantic-blue);
  color: var(--white);
}

@media (max-width: 640px) {
  .btn-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}

/* ========================================
   Cards
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.8rem;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--atlantic-blue);
  box-shadow: var(--shadow-accent);
}

.card-icon {
  font-size: 1.8rem;
  color: var(--atlantic-blue);
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Image Cards */
.image-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s;
}

.image-card:hover {
  border-color: var(--atlantic-blue);
  box-shadow: var(--shadow-accent);
}

.image-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s;
}

.image-card:hover img {
  transform: scale(1.05);
}

.image-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(13, 17, 23, 0.95));
}

.image-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.image-card p {
  font-size: 0.85rem;
  color: var(--gray);
}

/* ========================================
   Tags
   ======================================== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--bg-tertiary);
  color: var(--gray-light);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid var(--border-subtle);
}

.tag-accent {
  background: rgba(14, 165, 233, 0.1);
  color: var(--atlantic-blue-light);
  border-color: var(--border-accent);
}

/* ========================================
   Feature Blocks
   ======================================== */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2rem 0;
}

.feature-block.reverse {
  direction: rtl;
}

.feature-block.reverse > * {
  direction: ltr;
}

.feature-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-content p {
  margin-bottom: 1.5rem;
}

.feature-image {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.feature-image img {
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    direction: ltr;
  }
}

/* ========================================
   Timeline
   ======================================== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-accent);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--atlantic-blue);
  border: 2px solid var(--bg-dark);
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--atlantic-blue);
  margin-bottom: 0.4rem;
}

.timeline-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--gray);
}

/* ========================================
   Gallery
   ======================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(13, 17, 23, 0.9));
}

.gallery-caption h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.gallery-caption p {
  font-size: 0.8rem;
  color: var(--gray);
}

/* ========================================
   Explore Section
   ======================================== */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.explore-card {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s;
  text-decoration: none;
}

.explore-card:hover {
  border-color: var(--atlantic-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}

.explore-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.4s;
}

.explore-card:hover img {
  transform: scale(1.08);
}

.explore-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.2rem 1.2rem;
  background: linear-gradient(transparent, rgba(13, 17, 23, 0.95));
}

.explore-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.explore-card h3 i {
  font-size: 0.85rem;
  color: var(--atlantic-blue);
}

.explore-card p {
  font-size: 0.85rem;
  color: var(--gray);
}

@media (max-width: 900px) {
  .explore-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Contact Section
   ======================================== */
.contact-content {
  max-width: 550px;
  margin: 0 auto;
  text-align: center;
}

.contact-content > p {
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  background: var(--atlantic-blue);
  color: var(--white);
  border-radius: 6px;
  font-weight: 500;
  min-width: 280px;
  transition: all 0.3s;
}

.contact-link:hover {
  background: var(--atlantic-blue-dark);
  box-shadow: var(--shadow-accent);
}

.contact-link.secondary {
  background: transparent;
  border: 2px solid var(--atlantic-blue);
  color: var(--atlantic-blue);
}

.contact-link.secondary:hover {
  background: var(--atlantic-blue);
  color: var(--white);
}

@media (max-width: 640px) {
  .contact-link {
    min-width: 100%;
  }
}

/* ========================================
   Page Header (for subpages)
   ======================================== */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(14, 165, 233, 0.03), transparent);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--gray);
}

/* ========================================
   Info Cards (for specs)
   ======================================== */
.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.5rem;
}

.info-card h4 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.info-card h4 i {
  color: var(--atlantic-blue);
}

.info-list {
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list li span:first-child {
  color: var(--gray);
}

.info-list li span:last-child {
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--gray);
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-accent { color: var(--atlantic-blue); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
