:root {
    --card-bg: #1e2d3d;
    --card-bg-light: #243447;
    --accent: #00c8ff;
    --text-primary: #f0f4f8;
    --text-muted: #c2d6e8;
    --border: rgba(0, 200, 255, 0.2);
}

body {
    background-image: url(bg_15.webp);
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 56px 0 0;
    background-color: #111e2b;
    color: #333;
    background-attachment: fixed;
    background-position: left;
}

/* === NAV === */

.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(13, 26, 38, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 200, 255, 0.12);
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.topnav.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.topnav-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.topnav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.topnav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.topnav-links a:hover,
.topnav-links a.active {
    color: var(--accent);
}

/* === HERO === */

.hero {
    background: linear-gradient(135deg, #0d1a26 0%, #1e2d3d 100%);
    color: var(--text-primary);
    padding: 100px 20px 70px;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--accent);
}

.hero h1 {
    font-size: 2.6em;
    margin: 0 0 12px 0;
    letter-spacing: 0.5px;
}

.hero p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* === SECTIONS === */

section {
    margin: 30px auto;
    padding: 36px 30px;
    max-width: 1000px;
    background: var(--card-bg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border-top: 3px solid var(--accent);
}

h2 {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    letter-spacing: 0.4px;
}

h3 {
    color: var(--text-primary);
    margin-top: 28px;
    font-size: 1.1rem;
}

p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* === PROJECT OVERVIEW === */

.project-overview {
    background: var(--card-bg-light);
    padding: 24px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 3px solid var(--accent);
}

.project-overview h2 {
    margin-top: 0;
}

/* === TECH STACK === */

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tech-item {
    background: var(--card-bg-light);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 200, 255, 0.15);
}

.tech-item h4 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* === GALLERY === */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 30px 0;
}

/* Featured wide items */
.gallery-item:nth-child(1),
.gallery-item:nth-child(6) {
    grid-column: span 2;
}

.gallery-item:nth-child(1) img,
.gallery-item:nth-child(6) img {
    height: 380px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 200, 255, 0.25);
    border-color: rgba(0, 200, 255, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

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

/* Always-visible gradient caption */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 20, 30, 0.95) 0%, rgba(10, 20, 30, 0.5) 65%, transparent 100%);
    padding: 48px 18px 16px;
}

.gallery-caption p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* === TIMELINE === */

.timeline {
    position: relative;
    padding: 10px 0;
}

.timeline-item {
    padding: 20px;
    background: var(--card-bg-light);
    border-radius: 8px;
    margin: 16px 0;
    border-left: 3px solid var(--accent);
}

.timeline-item h4 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* === SKILLS === */

.skills-learned {
    background: var(--card-bg-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.skills-learned ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills-learned li {
    padding: 12px 16px;
    margin: 8px 0;
    background: var(--card-bg);
    border-radius: 6px;
    border-left: 3px solid var(--accent);
    color: var(--text-muted);
    line-height: 1.6;
}

.skills-learned li strong {
    color: var(--text-primary);
}

/* === FUTURE GOALS === */

.future-goals {
    background: var(--card-bg-light);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 28px 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.future-goals h3 {
    color: var(--accent);
    margin-top: 0;
    font-size: 1.1rem;
}

.future-goals p strong {
    color: var(--text-primary);
}

/* === LINKS === */

.back-link {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 22px;
    background: transparent;
    color: var(--accent);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: background 0.2s ease, border-color 0.2s ease;
    font-size: 0.95rem;
}

.back-link:hover {
    background: rgba(0, 200, 255, 0.1);
    border-color: var(--accent);
}

.contact-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.2s;
}

.contact-link:hover {
    opacity: 0.8;
}

html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2em;
    }

    .tech-stack {
        grid-template-columns: 1fr;
    }
}
