/* ============== GENERAL SETUP & VARIABLES ============== */
:root {
    --bg-color: #F8F9FA;
    --primary-text-color: #382D4B;
    --secondary-text-color: #5A5A6D;
    --button-bg-color: #E6E6FA;
    --highlight-color: #A9A9D4;
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Lato', sans-serif;
    --header-height: 70px;
    --transition-curve: cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark-mode {
    --bg-color: #1A202C;
    --primary-text-color: #EDF2F7;
    --secondary-text-color: #A0AEC0;
    --button-bg-color: #2D3748;
    --highlight-color: #4A5568;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============== UTILITY CLASSES ============== */
.d-none {
    display: none;
}

/* ============== SCROLLING BEHAVIOR ============== */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: var(--body-font);
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
}

section {
    width: 100%;
    min-height: 100vh;
    padding: var(--header-height) 10% 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    position: relative;
}

/* ============== HEADER / NAVIGATION ============== */
header nav a:focus-visible {
    outline: none;
    border-radius: 4px;
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--highlight-color);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: var(--bg-color);
    transition: background-color 0.4s ease;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

header .logo {
    font-family: var(--heading-font);
    font-size: 2rem;
    font-weight: 700;
}

header nav {
    display: flex;
    gap: 40px;
}

header nav a {
    text-decoration: none;
    color: var(--primary-text-color);
    font-weight: 700;
    position: relative;
    transition: color 0.3s var(--transition-curve);
    padding: 5px 0;
}

header nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary-text-color);
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--transition-curve);
}

header nav a:hover::after,
header nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ============== THEME TOGGLE STYLES ============== */
.theme-toggle {
    background: none;
    border: none;
    width: 34px;
    height: 34px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--highlight-color);
    border-radius: 50%;
}

.sun-icon, .moon-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    transition: all 0.4s ease;
}

.sun-icon {
    background-color: var(--primary-text-color);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
}

.moon-icon {
    border-radius: 50%;
    background-color: var(--primary-text-color);
    transform: scale(1) rotate(0deg);
    opacity: 1;
    position: relative;
    overflow: hidden;
}

.moon-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--bg-color);
    top: 3px;
    left: 7px;
    transition: background-color 0.4s ease;
}

.sun-icon:hover, .moon-icon:hover {
    transform: scale(1.15) rotate(15deg);
}

body.dark-mode .sun-icon {
    transform: scale(1);
    opacity: 1;
}
body.dark-mode .sun-icon:hover {
    transform: scale(1.15) rotate(15deg);
}

body.dark-mode .moon-icon {
    transform: scale(0) rotate(90deg);
    opacity: 0;
}

/* ============== TYPOGRAPHY & BUTTONS ============== */
h1, h2 {
    font-family: var(--heading-font);
    line-height: 1.2;
}
h1 { font-size: clamp(1.8rem, 3.5vw + 0.5rem, 3rem); }
h2 { font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.2rem); }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p {
    font-size: clamp(0.9rem, 0.5vw + 0.8rem, 1.05rem);
    line-height: 1.7;
    max-width: 550px;
    color: var(--secondary-text-color);
}

.primary-btn {
    margin-top: 1.2rem;
    padding: 12px 26px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-text-color);
    background-color: var(--button-bg-color);
    border: none;
    border-radius: 50px;
    transition: all 0.3s var(--transition-curve);
    display: inline-block;
    text-decoration: none;
}

a.primary-btn {
    cursor: pointer;
}
a.primary-btn:hover {
    background-color: var(--primary-text-color);
    color: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
a.primary-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--highlight-color);
}


/* ============== HERO SECTION STYLES ============== */
#hero { text-align: center; }
#hero h1 { margin-bottom: 0.8rem; }
#hero p { margin: 0.8rem auto; }

.scroll-indicator {
    position: absolute;
    right: 50px;
    bottom: 50px;
    writing-mode: vertical-rl;
    letter-spacing: 2px;
}

/* ============== TWO COLUMN LAYOUT ============== */
.two-column {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    width: 100%;
}

.column-left { flex-basis: 40%; }
.column-right { flex-basis: 60%; }

/* ============== PROJECT (CONTENT) SECTION STYLES ============== */
.project .subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.project h2 { margin-bottom: 0.5rem; }

.project-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.4s var(--transition-curve), box-shadow 0.4s var(--transition-curve);
}

.project-image:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

#about.two-column > div,
#resources.two-column > div,
#utilities.two-column > div {
    flex-basis: 0;
    flex-grow: 1;
}

/* ============== CONTACT SECTION STYLES ============== */
#contact p { font-size: 1.2rem; }
#contact a { color: var(--primary-text-color); font-weight: 700; }

/* ============== FADE-IN ANIMATION ============== */
.hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--transition-curve), transform 0.6s var(--transition-curve);
}
.hidden.delay-1 { transition-delay: 0.2s; }
.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================== */
/* STYLES FOR OTHER PAGES (e.g. TOOL)         */
/* ================================================== */
#tool-section {
    padding: 100px 5% 60px;
    min-height: 100vh;
    display: block;
    scroll-snap-align: none;
}
.tool-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}
.tool-header h1 {
    font-family: var(--heading-font);
    color: var(--primary-text-color);
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: clamp(1.8rem, 3.5vw + 0.5rem, 2.5rem);
}
.tool-header .subtitle {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    opacity: 0.8;
}

#form-container, #result-container {
    background-color: var(--bg-color);
    padding: 2rem 2.5rem;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}
body.dark-mode #form-container, body.dark-mode #result-container {
    border-color: rgba(255,255,255,0.15);
}

/* ============== RESPONSIVE ADJUSTMENTS ============== */
@media (max-width: 1024px) {
    section {
        padding-left: 5%;
        padding-right: 5%;
    }
    .two-column {
        gap: 2rem;
    }
    header {
        padding-left: 5%;
        padding-right: 5%;
    }
}

@media (max-width: 768px) {
    section {
        padding: var(--header-height) 8% 60px;
    }
    header {
        padding: 20px 8%;
    }
    .header-right {
        gap: 15px;
    }
    header nav {
        gap: 20px;
    }
    header nav a {
        font-size: 0.9rem;
    }
    .two-column {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .project {
        flex-direction: column-reverse;
    }
    .column-left, .column-right {
        flex-basis: auto;
        width: 100%;
    }
    .project-image {
        text-align: center;
        margin-bottom: 2rem;
        aspect-ratio: 16 / 9;
    }
    .scroll-indicator { display: none; }
    
    #tool-section {
        padding: 80px 5% 40px;
    }
    #form-container, #result-container {
        padding: 1.5rem;
    }
 
    .two-column p {
        text-align: left;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Prevent text selection */
.no-select {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer */
    user-select: none;         /* Standard syntax */
}


