/* ============================================
   DESIGN SYSTEM — PORTFOLIO
   Dark-blue minimalist with warm orange accents
   Font: Lato Regular (Google Fonts)
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Background colors */
  --bg-primary: #080d19;
  --bg-secondary: #0c1221;
  --bg-tertiary: #111a2e;
  --bg-card: #0f1729;
  --bg-card-hover: #14203a;
  --bg-nav: rgba(8, 13, 25, 0.85);

  /* Text colors */
  --text-primary: #f0f2f5;
  --text-secondary: #8a94a6;
  --text-muted: #5a6478;
  --text-accent: #e8732a;

  /* Accent — warm orange */
  --accent: #e8732a;
  --accent-hover: #f28a42;
  --accent-glow: rgba(232, 115, 42, 0.25);

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.03);

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1140px;
  --gap: 24px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Transition */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul {
  list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.15rem;
}

h4 {
  font-size: 0.95rem;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.section-title {
  margin-bottom: 48px;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-transform: none;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  background: transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links .btn {
  padding: 10px 24px;
  font-size: 0.85rem;
}

.nav-links .btn::after {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-tagline {
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 520px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Floating decorative elements */
.hero-decoration {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 380px;
  opacity: 0.07;
  pointer-events: none;
}

.hero-decoration .line {
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
}

.hero-decoration .line-h {
  width: 100%;
  height: 1px;
}

.hero-decoration .line-v {
  width: 1px;
  height: 100%;
}

.hero-decoration .line:nth-child(1) {
  top: 0;
}

.hero-decoration .line:nth-child(2) {
  top: 33%;
}

.hero-decoration .line:nth-child(3) {
  top: 66%;
}

.hero-decoration .line:nth-child(4) {
  top: 100%;
}

.hero-decoration .line:nth-child(5) {
  left: 0;
}

.hero-decoration .line:nth-child(6) {
  left: 33%;
}

.hero-decoration .line:nth-child(7) {
  left: 66%;
}

.hero-decoration .line:nth-child(8) {
  left: 100%;
}

/* Social sidebar */
.social-sidebar {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 100;
}

.social-sidebar a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition);
}

.social-sidebar a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
  padding: var(--section-padding);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  margin-bottom: 24px;
}

.about-text p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-text p strong {
  color: var(--accent);
  font-weight: 700;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
  margin-top: 28px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.skill-item::before {
  content: '▹';
  color: var(--accent);
  font-size: 0.8rem;
}

a.skill-item {
  cursor: pointer;
}

a.skill-item:hover {
  color: var(--accent);
}

.about-image {
  position: relative;
}

.about-image-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-tertiary);
}

.about-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
  transition: filter var(--transition);
}

.about-image-wrapper:hover img {
  filter: grayscale(0%);
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232, 115, 42, 0.1), transparent);
  pointer-events: none;
}

.about-image-border {
  position: absolute;
  top: 16px;
  left: 16px;
  right: -16px;
  bottom: -16px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  opacity: 0.3;
  z-index: -1;
}

/* LinkedIn badge — About section */
.linkedin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 10px 20px;
  background: rgba(10, 102, 194, 0.1);
  border: 1.5px solid rgba(10, 102, 194, 0.35);
  border-radius: 30px;
  color: #5b9bd5;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: all var(--transition);
}

.linkedin-badge:hover {
  background: rgba(10, 102, 194, 0.2);
  border-color: rgba(10, 102, 194, 0.7);
  color: #78b4e8;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(10, 102, 194, 0.2);
}

/* ============================================
   WORKS / PROJECTS SECTION
   ============================================ */
.works {
  padding: var(--section-padding);
}

.works-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.works-header .section-title {
  margin-bottom: 0;
}

.gallery-links {
  display: flex;
  gap: 12px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.category-section {
  margin-bottom: 64px;
}

.category-section:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(232, 115, 42, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.4rem;
  background: var(--accent);
  border-radius: 2px;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  display: block;
  color: inherit;
  text-decoration: none;
}

a.work-card .work-card-body h3 {
  color: var(--text-primary);
}

a.work-card .work-card-body p {
  color: var(--text-muted);
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 115, 42, 0.2);
  box-shadow: var(--shadow-card);
}

.work-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-tertiary);
  overflow: hidden;
  position: relative;
}

.work-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.work-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(8, 13, 25, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  border: 1px solid rgba(232, 115, 42, 0.2);
}

.work-card-body {
  padding: 20px;
}

.work-card-body h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.work-card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.work-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-card-tags span {
  font-size: 0.72rem;
  padding: 4px 10px;
  background: rgba(232, 115, 42, 0.08);
  color: var(--accent);
  border-radius: 20px;
  border: 1px solid rgba(232, 115, 42, 0.15);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
  padding: var(--section-padding);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.contact-header {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 48px;
}

.contact-header p {
  margin-top: 16px;
}

.contact-content {
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit {
  text-align: center;
  margin-top: 8px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ============================================
   GALLERY PAGE STYLES
   ============================================ */
.gallery-hero {
  padding: 140px 0 60px;
  text-align: center;
}

.gallery-hero p {
  max-width: 540px;
  margin: 16px auto 0;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 24px;
  border-radius: 30px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: rgba(232, 115, 42, 0.4);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.gallery-item.hide {
  display: none !important;
}

.gallery-section {
  padding: 0 0 100px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: rgba(232, 115, 42, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 13, 25, 0.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-overlay h4 {
  font-size: 0.95rem;
}

.gallery-item-overlay p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8, 13, 25, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 85vw;
  max-height: 85vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.lightbox-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

/* ============================================
   SCROLL REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.revealed>*:nth-child(1) {
  transition-delay: 0.05s;
}

.reveal-stagger.revealed>*:nth-child(2) {
  transition-delay: 0.12s;
}

.reveal-stagger.revealed>*:nth-child(3) {
  transition-delay: 0.19s;
}

.reveal-stagger.revealed>*:nth-child(4) {
  transition-delay: 0.26s;
}

.reveal-stagger.revealed>*:nth-child(5) {
  transition-delay: 0.33s;
}

.reveal-stagger.revealed>*:nth-child(6) {
  transition-delay: 0.40s;
}

.reveal-stagger.revealed>*:nth-child(7) {
  transition-delay: 0.47s;
}

.reveal-stagger.revealed>*:nth-child(8) {
  transition-delay: 0.54s;
}

.reveal-stagger.revealed>*:nth-child(9) {
  transition-delay: 0.61s;
}

.reveal-stagger.revealed>* {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    max-width: 380px;
    margin: 0 auto;
  }

  .works-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-decoration {
    display: none;
  }

  .social-sidebar {
    display: none;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 72px 0;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    border-left: 1px solid var(--border-color);
    transition: right var(--transition);
  }

  .nav-links.open {
    right: 0;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hero {
    min-height: 85vh;
    padding: 100px 0 60px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .works-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-links {
    flex-direction: column;
    width: 100%;
  }

  .gallery-links .btn {
    width: 100%;
    justify-content: center;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 1.8rem;
  }

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