/* ==========================================================================
   CSS DESIGN SYSTEM: MERCURY-INSPIRED PORTFOLIO
   Created: July 20, 2026
   ========================================================================== */

/* --- Fonts & Variables --- */
:root {
  /* Colors */
  --bg-dark: #FAF7F2;
  --bg-darker: #F4EFE6;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --accent-gold: #003B49;
  --accent-gold-rgb: 0, 59, 73;
  --accent-gold-hover: #00505F;
  --accent-glow: rgba(0, 59, 73, 0.08);
  --border-light: rgba(43, 38, 32, 0.08);
  --border-hover: rgba(43, 38, 32, 0.15);
  
  --text-primary: #2B2620;
  --color-secondary: #003B49;
  --text-secondary: var(--color-secondary);
  --text-muted: #8C847D;
  --text-inverse: #FAF7F2;

  /* Typography */
  --font-heading: 'IBM Plex Sans', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;

  /* Spacing */
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 1.5rem;
  --gap-lg: 2rem;
  --gap-xl: 3rem;
  --container-max-width: 1200px;

  /* Transitions */
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-snappy: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 12px;
}

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

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* --- Premium Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: rgba(43, 38, 32, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* --- Interactive Ambient Background Glows --- */
.ambient-glow {
  position: fixed;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(140px);
  opacity: 0.45;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#ambient-glow-1 {
  background: radial-gradient(circle, rgba(var(--accent-gold-rgb), 0.12) 0%, transparent 70%);
  top: -10%;
  right: -10%;
}

#ambient-glow-2 {
  background: radial-gradient(circle, rgba(179, 142, 75, 0.05) 0%, transparent 70%);
  bottom: -10%;
  left: -10%;
}

/* --- Layout Wrapper --- */
.section-container {
  width: 90%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--gap-xl) 0;
}

/* --- Typography Utilities --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-nebula {
  color: #0b1d33;
  display: inline-block;
}

/* --- Button Component --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}

.btn-primary:hover {
  background-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(var(--accent-gold-rgb), 0.2);
}

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

.btn-secondary:hover {
  border-color: var(--accent-gold);
  background-color: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

.btn-premium {
  background: linear-gradient(135deg, rgba(var(--accent-gold-rgb), 0.1), rgba(var(--accent-gold-rgb), 0.02));
  color: var(--accent-gold);
  border-color: rgba(var(--accent-gold-rgb), 0.3);
}

.btn-premium:hover {
  background: var(--accent-gold);
  color: var(--bg-dark);
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(var(--accent-gold-rgb), 0.2);
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-gold);
  padding: 0;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  gap: 0.25rem;
}

.btn-text:hover {
  color: var(--accent-gold-hover);
  text-decoration: underline;
}

/* --- Frosted Navigation Bar --- */
.navbar-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
  background-color: rgba(250, 247, 242, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.navbar {
  max-width: var(--container-max-width);
  width: 90%;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand .logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  margin-right: 2rem;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: var(--transition-snappy);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

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

.nav-item.active {
  background-color: rgba(255, 255, 255, 0.04);
}

.hero-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 70px);
  padding: var(--gap-xl) 0;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-dark);
}

.hero-interactive-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    750px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(24, 76, 65, 0.16) 0%,
    rgba(24, 76, 65, 0.06) 35%,
    rgba(24, 76, 65, 0.015) 70%,
    transparent 100%
  );
}

.hero-grain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.045; /* Extremely subtle tactile feel */
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.hero-container {
  max-width: var(--container-max-width);
  width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-xl);
  align-items: center;
  z-index: 2;
}

@media (min-width: 992px) {
  .hero-container {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: stretch;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--gap-md);
}

.hero-image-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  z-index: 1;
}

@media (min-width: 992px) {
  .hero-image-container {
    max-width: 100%;
    margin-left: auto;
    margin-right: 0;
    height: 0; /* Force grid track height to ignore the image column */
    min-height: 100%; /* Stretch to match the text column height exactly */
    aspect-ratio: auto;
  }
  
  .hero-image-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

.hero-image-glow-underlay {
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(77, 122, 110, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.hero-image-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  background-color: var(--bg-card);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition: var(--transition-smooth);
}

.hero-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom; /* Cuts the top of the photo, preserves the bottom */
  filter: grayscale(12%);
  transition: var(--transition-smooth);
}

/* Hover Interaction effects */
.hero-image-container:hover .hero-image-card {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(77, 122, 110, 0.5);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.hero-image-container:hover .hero-profile-img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.hero-image-container:hover .hero-image-glow-underlay {
  transform: scale(1.15);
  opacity: 1.25;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(0.88rem, 1.8vw, 0.95rem);
  color: var(--text-secondary);
  max-width: 580px;
  font-weight: 400;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: var(--gap-sm);
  z-index: 3;
}

/* --- General Section Header --- */
.section-header {
  margin-bottom: var(--gap-xl);
  text-align: center;
}

.section-meta {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin-bottom: var(--gap-xs);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: var(--gap-xs);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
}

/* --- Glassmorphic Card (Common Component) --- */
.dashboard-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--gap-md);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.dashboard-card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-card-hover);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* --- Dashboard Section & Widgets --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap-md);
}

/* Widget Layout Settings */
.widget-stats {
  grid-column: span 5;
}

.widget-tech {
  grid-column: span 7;
}

.widget-activity {
  grid-column: span 6;
}

.widget-chart {
  grid-column: span 6;
}

/* Widget Header styles */
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap-md);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--gap-xs);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.widget-caption {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.widget-badge {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background-color: rgba(78, 181, 166, 0.1);
  color: #4eb5a6;
  border-radius: 4px;
}

.widget-badge.pulse {
  animation: log-pulse 2s infinite;
}

@keyframes log-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Widget: Quick Stats Styles */
.stats-display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(100% - 40px);
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--gap-xs);
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Widget: Tech Interactive Hub */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--gap-sm);
}

.tech-tag {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-snappy);
}

.tech-tag:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

.tech-tag.active {
  background: linear-gradient(135deg, rgba(var(--accent-gold-rgb), 0.15), rgba(var(--accent-gold-rgb), 0.04));
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.tech-icon {
  color: var(--accent-gold);
}

.tech-detail {
  background: rgba(4, 5, 6, 0.3);
  border-radius: var(--radius-md);
  padding: var(--gap-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tech-detail-heading {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.tech-detail-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--gap-sm);
}

.tech-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  overflow: hidden;
}

.tech-progress-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Widget: Activity Log */
.activity-log {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 150px;
  overflow-y: auto;
  padding-right: var(--gap-xs);
}

.log-line {
  display: flex;
  gap: 0.75rem;
}

.log-time {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.log-event {
  word-break: break-all;
}

.text-accent {
  color: #4eb5a6;
}

.animate-log {
  animation: flash-log-line 2s infinite;
}

@keyframes flash-log-line {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

/* Widget: Performance Chart */
.chart-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.performance-chart {
  width: 100%;
  height: auto;
  max-height: 130px;
  display: block;
}

#chart-pulse-node {
  animation: pulse-node 1.5s infinite;
}

@keyframes pulse-node {
  0% { r: 5; opacity: 1; }
  50% { r: 7; opacity: 0.8; }
  100% { r: 5; opacity: 1; }
}

.chart-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

/* --- Projects Section (Featured Cards) --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.project-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(43, 38, 32, 0.08);
}

.project-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-placeholder-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

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

.project-logo-accent {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.project-info {
  padding: var(--gap-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.5rem;
}

.project-tag {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.project-card-title {
  font-size: 1.15rem;
  color: var(--text-primary);
}

.project-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
  flex-grow: 1;
}

/* --- About & Experience Section --- */
.timeline-wrapper {
  position: relative;
  width: 100%;
  padding-left: var(--gap-lg);
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-gold) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--gap-lg);
}

.timeline-dot {
  position: absolute;
  left: -21px;
  top: 6px;
  width: 10px;
  height: 10px;
  background-color: var(--bg-dark);
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-gold);
  z-index: 2;
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-dot {
  background-color: var(--accent-gold);
  transform: scale(1.3);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  transition: var(--transition-smooth);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
}

.timeline-role {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.timeline-company {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

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

.timeline-bullets {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-bullets li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.5;
  position: relative;
  padding-left: 1.2rem;
  text-align: left;
}

.timeline-bullets li::before {
  content: "•";
  position: absolute;
  left: 0.2rem;
  top: -0.05rem;
  color: var(--accent-gold);
  font-size: 1rem;
}

/* --- Education Subsection --- */
.education-wrapper {
  margin-top: var(--gap-xl);
  padding-top: var(--gap-lg);
  border-top: 1px solid var(--border-light);
  width: 100%;
}

.education-header {
  margin-bottom: var(--gap-md);
  text-align: left;
}

.education-section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap-md);
}

.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  transition: var(--transition-smooth);
  text-align: left;
}

.education-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.education-date {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
}

.education-degree {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.education-institution {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Contact Section --- */
.contact-box {
  width: 100%;
  padding: var(--gap-xl);
  position: relative;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap-md);
  margin-top: var(--gap-lg);
}

.contact-info-card {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.contact-info-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-secondary);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.contact-card-icon {
  font-size: 1.4rem;
  color: var(--color-secondary);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 59, 73, 0.05);
  border-radius: 50%;
  flex-shrink: 0;
}

.contact-card-content {
  display: flex;
  flex-direction: column;
}

.contact-card-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-card-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  background-color: rgba(4, 5, 6, 0.4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.8rem 1rem;
  outline: none;
  transition: var(--transition-snappy);
  width: 100%;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%238a8f98' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(var(--accent-gold-rgb), 0.1);
  background-color: rgba(4, 5, 6, 0.6);
}

/* Modern Validation Styling */
.form-group input:focus:invalid, 
.form-group select:focus:invalid, 
.form-group textarea:focus:invalid {
  border-color: #ff6b6b;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.1);
}

/* User Valid styling targets states once the user exits the input */
.form-group input:user-valid,
.form-group select:user-valid,
.form-group textarea:user-valid {
  border-color: #4eb5a6;
}

.form-group input:user-invalid,
.form-group select:user-invalid,
.form-group textarea:user-invalid {
  border-color: #ff6b6b;
}

.input-error-msg {
  color: #ff6b6b;
  font-size: 0.7rem;
  display: none;
  margin-top: 0.2rem;
}

.form-group input:user-invalid ~ .input-error-msg,
.form-group select:user-invalid ~ .input-error-msg,
.form-group textarea:user-invalid ~ .input-error-msg {
  display: block;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--gap-xs);
}

/* Success Overlay */
.contact-success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity var(--transition-smooth);
  opacity: 1;
}

.contact-success-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.success-message-box {
  text-align: center;
  max-width: 500px;
  width: 90%;
  padding: var(--gap-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
}

.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(78, 181, 166, 0.1);
  color: #4eb5a6;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(78, 181, 166, 0.2);
}

.success-message-box h3 {
  font-size: 1.5rem;
}

.success-message-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--gap-sm);
}

/* --- Footer --- */
.footer-wrapper {
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-darker);
}

.footer-container {
  max-width: var(--container-max-width);
  width: 90%;
  margin: 0 auto;
  padding: var(--gap-lg) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-logo-section .brand-text {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

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

.footer-links-section a {
  color: var(--text-muted);
  font-family: var(--font-heading);
  text-decoration: none;
  font-size: 0.8rem;
  transition: var(--transition-snappy);
}

.footer-links-section a:hover {
  color: var(--text-primary);
}

/* --- Project dialogue/Modal Overlay --- */
.project-dialog {
  border: none;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-dialog[open] {
  opacity: 1;
  pointer-events: auto;
}

.project-dialog::backdrop {
  background-color: rgba(43, 38, 33, 0.55);
  backdrop-filter: blur(8px);
  transition: backdrop-filter 0.3s ease;
}

.dialog-frame {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 900px;
  height: 85vh;
  max-height: 750px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(43, 38, 32, 0.15);
}

.dialog-close-btn {
  position: absolute;
  top: var(--gap-md);
  right: var(--gap-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 1010;
  box-shadow: 0 4px 12px rgba(43, 38, 32, 0.08);
  transition: var(--transition-snappy);
}

.dialog-close-btn:hover {
  background: rgba(43, 38, 32, 0.04);
  border-color: var(--accent-gold);
}

.dialog-scroll-content {
  overflow-y: auto;
  padding: var(--gap-xl) 4.5rem var(--gap-lg) var(--gap-xl);
  height: 100%;
}

.dialog-tag {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.dialog-title {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
}

.dialog-meta-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--gap-lg);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--gap-sm);
}

.dialog-body-grid {
  display: block;
}

.dialog-main-content {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.dialog-main-content h4 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.dialog-main-content p,
.dialog-rich-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
}

.dialog-rich-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.dialog-rich-content p {
  margin: 0;
}

.dialog-rich-content h5 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

.dialog-rich-content figure {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dialog-rich-content img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  background: #0f1013;
  transition: transform var(--transition-snappy), border-color var(--transition-snappy);
}

.dialog-rich-content img:hover {
  transform: translateY(-2px) scale(1.008);
  border-color: rgba(197, 160, 89, 0.25);
}

.dialog-rich-content figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  font-style: normal;
}

.dialog-rich-content ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dialog-rich-content li {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.dialog-side-specs {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.spec-card {
  background: rgba(4, 5, 6, 0.4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
}

.spec-card h5 {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.spec-list li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.spec-list li::before {
  content: "•";
  color: var(--accent-gold);
}

.spec-metric-display {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spec-metric-val {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1;
}

.spec-metric-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Responsive Adaptations (Container Queries / Media Queries) --- */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .widget-stats, .widget-tech, .widget-activity, .widget-chart {
    grid-column: span 12;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* In a absolute production environment we can build mobile hamburger but keeping it clean for now */
  }
  .form-group-row {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .dialog-body-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.3rem;
  }
}

/* --- Scrollable Browser Mockup Framework --- */
.browser-scroll-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: #0f1013;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin: 1.5rem 0;
  transition: border-color var(--transition-snappy);
}

.browser-scroll-container:hover {
  border-color: rgba(var(--accent-gold-rgb), 0.25);
}

.browser-header-mockup {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #16171d;
  border-bottom: 1px solid var(--border-light);
}

.browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.browser-dot.dot-red {
  background: #ff5f56;
}

.browser-dot.dot-yellow {
  background: #ffbd2e;
}

.browser-dot.dot-green {
  background: #27c93f;
}

.browser-address-bar {
  flex: 1;
  max-width: 320px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.browser-scroll-viewport {
  width: 100%;
  height: 520px;
  overflow-y: scroll;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
}

.browser-scroll-viewport::-webkit-scrollbar {
  width: 8px;
}

.browser-scroll-viewport::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.browser-scroll-viewport::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.browser-scroll-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.browser-scroll-viewport img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  transition: none !important;
}

.browser-scroll-viewport img:hover {
  transform: none !important;
}

/* --- Scroll-driven animations with proper supports checking --- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    /* Define keyframes */
    @keyframes entry-reveal {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes navbar-shrink {
      to {
        height: 60px;
        background-color: rgba(7, 8, 10, 0.85);
      }
    }

    /* Apply animations to items */
    .reveal-on-scroll {
      animation: entry-reveal linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }

    /* Staggered project cards using container indices */
    .project-card {
      animation: entry-reveal linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }

    /* Parallax effect elements on scrollport coordinates */
    .hero-container {
      view-timeline: --hero-tl block;
    }
  }
}
