/* --- Core Reset & Variable Tokens --- */
:root {
    --bg-deep-navy: #0f172a;   /* Header & Footer */
    --bg-alice: #F0F8FF;       /* Soft Alice Blue Background */
    --bg-white: #ffffff;       /* Alternating Section Backgrounds */
    --text-dark: #1e293b;      /* Primary Text */
    --text-muted: #475569;     /* Secondary Text */
    --accent-blue: #0284c7;    /* Highlight Links & Accents */
    --white: #ffffff;
    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-stack);
    background-color: var(--bg-alice);
    color: var(--text-dark);
}

body {
    line-height: 1.6;
}

/* --- Layout Utility Classes --- */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 0;
}

.max-width-md {
    max-width: 700px;
}

.text-center {
    text-align: center;
}

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

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* --- High-Contrast Architectural Dot Pattern --- */
.bg-pattern {
    background-color: var(--bg-white);
    
    /* Layer 1: Soft structural radial gradient (creates the dot matrix mesh) */
    /* Layer 2: A gentle horizontal fade that breaks up the screen visually */
    background-image: 
        radial-gradient(var(--accent-blue) 1.5px, transparent 1.5px),
        linear-gradient(to bottom, rgba(240, 248, 255, 0.7), rgba(255, 255, 255, 1));
        
    /* Spacing coordinates for the dots */
    background-size: 24px 24px, 100% 100%;
    background-position: center top;
}



/* --- Header & Navigation --- */
.main-header {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header .container {
    padding: 1rem 0;
}

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

.logo {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* --- Hero Layout --- */
.hero {
    padding-top: 3rem;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    box-shadow: 0 15px 30px -10px rgba(15, 23, 42, 0.15);
}

h1 {
    font-size: 3.25rem;
    color: var(--bg-deep-navy);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.lead-text, .dark-text {
    font-size: 1.15rem;
    color: var(--text-dark);
    max-width: 800px;
    margin: 0 auto;
}

/* --- Content Typography & Cards --- */
h2 {
    font-size: 1.6rem;
    color: var(--bg-deep-navy);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Feature Cards now pop cleanly on white backgrounds */
.card {
    background: var(--bg-alice);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.card h3 {
    color: var(--bg-deep-navy);
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

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

/* --- Portfolio Design --- */
.portfolio-grid {
    margin-top: 1rem;
}

.portfolio-item {
    background: var(--bg-alice); /* Puts the card against the white section canvas cleanly */
    border-radius: 12px;
    overflow: hidden; /* Clips image corners perfectly to the card radius */
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    text-align: left; /* Changes text orientation to look more natural within content blocks */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Subtle hover lift effect that keeps standard rendering perfectly fast */
.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.1);
}

.portfolio-img-wrapper {
    width: 100%;
    height: 220px;
    background-color: #cbd5e1; /* Smooth grey placeholder color while loading image asset */
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops image neatly inside dimensions without distortion */
    display: block;
}

.portfolio-content {
    padding: 2rem 1.5rem;
}

.portfolio-item h3 {
    color: var(--bg-deep-navy);
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.portfolio-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}


/* --- Contact Info --- */
.contact-list {
    list-style: none;
    font-size: 1.2rem;
}

.contact-list li {
    margin: 1.2rem 0;
    color: #333333;
}

.contact-list a {
    color: #333333;
    text-decoration: none;
    font-weight: 600;
}

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

/* --- Footer --- */
.main-footer {
    background-color: var(--bg-deep-navy);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.main-footer .container {
    padding: 2.5rem 0;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .container { padding: 3rem 0; }
    .header-flex { flex-direction: column; gap: 1.2rem; }
    .nav-links a { margin: 0 1rem; }
}
/* Styling for your custom link class */
.dark-blue-link {
  color: #003366 !important;
  text-decoration: underline;
}

/* Keeps it dark blue even after being clicked */
.dark-blue-link:visited {
  color: #003366 !important;
}

/* Darkens slightly when hovered over */
.dark-blue-link:hover {
  color: #001f3f !important;
}