:root {
    --primary: #1f4873;    /* Changed from earthy brown to blue */
    --secondary: #D4A76A;  /* Warm tan */
    --accent: #A86F3F;     /* Darker brown for accents */
    --background: white; /* Soft beige background */
    --text: #2C1810;       /* Dark brown for text */
    --light-text: #5D4037; /* Lighter brown for secondary text */
    --white: #FFFFFF;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Hide the toggle by default on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    /* 1. Hide the logo on mobile as discussed */
    .logo {
        display: none; 
    }

    /* 2. Show the toggle button */
    .menu-toggle {
        display: block;
    }

    /* 3. Turn the nav-links into a mobile drawer */
    .nav-links {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: absolute;
        top: 60px; /* Adjust based on your nav height */
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    /* Class to show the menu when clicked (we'll use JS for this) */
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed header */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typewriter Effect */
.typewriter-container {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    font-size: 1.5rem;
    font-weight: 300;
}

.typewriter-container .tagline {
    margin: 0;
    padding: 0;
    color: white;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.typewriter-container .cursor {
    display: inline-block;
    margin-left: 2px;
    width: 3px;
    background-color: white;
    animation: blink 0.7s infinite;
    height: 1.5rem;
    vertical-align: middle;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Navigation */
nav {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Active navigation link */
.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-links a.active::after {
    width: 100%;
    background-color: var(--primary);
}

/* Header */
header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('/images/scotland_header.jpg') no-repeat center center/cover;
    margin-top: 60px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

header .container {
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--white);
    animation: fadeInUp 1s ease;
}

.typewriter-container {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.tagline {
    font-size: 1.8rem;
    color: var(--white);
    margin: 0;
    padding-right: 5px;
    font-weight: 300;
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--white);
    margin-left: 2px;
    animation: blink 1s infinite;
    height: 1.8rem;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    animation: fadeInUp 1s ease 0.4s both;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--primary);
    font-size: 1.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-links a:hover {
    transform: translateY(-5px);
    background-color: var(--primary);
    color: var(--white);
}

/* Scroll Animation */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--light-text);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    margin: 10px 0 5px 0;
    color: var(--primary);
}

.project-info .location {
    margin: 0 0 5px 0;
    font-style: italic;
    color: var(--light-text);
}

.project-info p {
    color: var(--light-text);
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: var(--secondary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Section */
#contact {
    background-color: var(--white);
}

.form-group {
    margin-bottom: 20px;
}

input,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(31, 72, 115, 0.2);
}

.btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(31, 72, 115, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 72, 115, 0.4);
}

/* Footer */
footer {
    background-color: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1F4873;
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #1F4873;
    transform: translateY(-3px);
}

.back-to-top.visible:hover {
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Ensure the link inside the card covers the whole area */
.project-card a {
    display: block;
    height: 100%;
}

/* Optional: Subtle focus state for accessibility */
.project-card a:focus {
    outline: 2px solid var(--primary);
    border-radius: 10px;
}

/* You can now safely delete all .modal, .modal-content, etc. rules from your CSS */

/* Form Status Messages */
/* Timeline Section */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-container {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease-in-out;
}

.timeline-container.show {
    opacity: 1;
    transform: translateY(0);
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--white);
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid var(--primary);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--primary);
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid var(--primary);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--primary) transparent transparent;
}

.right::after {
    left: -16px;
}

.timeline .content {
    padding: 20px 30px;
    background-color: var(--white);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline .content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.timeline .content h3 {
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 1.25rem;
}

.timeline .content h4 {
    color: var(--accent);
    margin: 5px 0 2px 0;
    font-size: 1.1rem;
}

.timeline .location {
    margin: 0 0 5px 0;
    font-style: italic;
    color: var(--light-text);
    font-size: 0.95rem;
}

.timeline .content p {
    color: var(--light-text);
    line-height: 1.6;
}

/* Responsive timeline */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-container::before {
        left: 60px;
        border: medium solid var(--primary);
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--primary) transparent transparent;
    }

    .left::after, .right::after {
        left: 15px;
    }

    .right {
        left: 0%;
    }
}

/* Animation for timeline items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-status {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.form-status.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border-left-color: #4caf50;
}

.form-status.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border-left-color: #f44336;
}

