html {
    scroll-padding-top: 150px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #e0e0e0;
}

.container {
    width: 90%;
    max-width: 1320px;
    margin: auto;
    padding: 20px;
}

header {
    color: #FF8C00;
    padding: 15px 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: flex-start;
    gap: 50px;
    align-items: center;
    position: sticky;
    top: 20px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: inherit;
    z-index: -1;
}

/* Push the first section down to clear the sticky header */
section:first-of-type {
    margin-top: 40px;
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    z-index: 1001;
    /* Keep above overlay */
}

.hamburger-line {
    width: 30px;
    height: 2px;
    background-color: #FF8C00;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Open state X animation */
.menu-toggle.open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open .hamburger-line:nth-child(2) {
    transform: translateY(-8px) rotate(-45deg);
}

.header-brand {
    display: flex;
    flex-direction: column;
}

.header-brand h1 {
    margin: 0;
    padding: 0;
    font-size: 2.85rem;
    letter-spacing: 0.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.header-brand h1 a {
    color: #FF8C00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-brand h1 a:hover {
    color: #e07b00;
}

.header-brand p {
    margin: 2px 0 0 0;
    font-size: 0.95rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: space-between;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

header nav ul li {
    margin: 0;
}

header nav ul li a {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #FF8C00;
    transition: width 0.3s ease;
}

header nav ul li a:hover::after,
header nav ul li a.active::after {
    width: 100%;
}

header nav ul li a:hover,
header nav ul li a.active {
    color: #fff;
    border-bottom: none;
}

.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-links a {
    color: #ccc;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #FF8C00;
}

#add-project,
#project-list {
    background: #1e1e1e;
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.1);
}

h2 {
    color: #FF8C00;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #2d2d2d;
    color: #fff;
    box-sizing: border-box;
    /* Fixes padding width issue */
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #FF8C00;
}

button {
    display: inline-block;
    background: #FF8C00;
    color: #121212;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

button:hover {
    background: #e07b00;
}

.project-item {
    border-bottom: 1px solid #333;
    padding: 15px 0;
}

.project-item:last-child,
.post-item:last-child {
    border-bottom: none;
}

.project-item h3,
.post-item h3 {
    margin-top: 0;
    color: #fff;
    margin-bottom: 5px;
}

.post-item {
    border-bottom: 1px solid #333;
    padding: 20px 0;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.post-date {
    font-size: 0.8em;
    color: #888;
}

.post-actions {
    margin-top: 15px;
}

.post-actions button {
    padding: 5px 10px;
    font-size: 0.9em;
    margin-right: 5px;
}

.form-actions {
    margin-top: 10px;
}

@media (max-width: 900px) {
    .header-right {
        gap: 15px;
    }

    header nav ul {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    header {
        padding: 12px 20px;
        top: 10px;
        margin-bottom: 20px;
        border-radius: 8px;
        justify-content: space-between;
        gap: 0;
    }

    .header-right {
        justify-content: flex-end;
        gap: 15px;
    }

    .header-brand {
        z-index: 1001;
        /* Keep above overlay */
    }

    .header-brand h1 {
        font-size: 1.55rem;
        letter-spacing: 0.5px;
    }

    .header-brand p {
        display: flex;
        flex-direction: column;
        line-height: 1.3;
        margin-top: 4px;
    }

    .header-brand p .role {
        font-size: 1.15rem;
        letter-spacing: 0.7px;
    }

    .header-brand p .role-separator {
        display: none;
    }

    .social-links {
        z-index: 1001;
    }

    .menu-toggle {
        display: flex;
        /* Hamburger visible on mobile */
        z-index: 1001;
    }

    /* Full-screen Nav Overlay */
    header nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    header nav.open {
        opacity: 1;
        visibility: visible;
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-bottom: 0;
        gap: 30px;
    }

    header nav ul li {
        margin: 0;
    }

    header nav ul li a {
        font-size: 1.8rem;
    }
}

/* Projects Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
    padding: 20px 0;
}

.project-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.2);
    border-color: #FF8C00;
}

.project-card .project-hero-image {
    padding: 15px;
    box-sizing: border-box;
    border-radius: 20px;
}

.project-hero-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project-card-title {
    font-size: 1.2rem;
    color: #FF8C00;
    margin: 0;
    padding: 15px;
    text-align: center;
    background-color: #1e1e1e;
    font-weight: bold;
}

/* Project Detail Full Page Styles */
.project-full-container {
    padding: 40px 0;
    max-width: 900px;
    margin: 0 auto;
}

.project-full-hero {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    margin-bottom: 30px;
    border-radius: 8px;
}

.project-full-title {
    color: #FF8C00;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.project-full-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #ddd;
}

/* Blog Grid Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.blog-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.2);
    border-color: #FF8C00;
}

.blog-card h3 {
    margin-top: 0;
    color: #FF8C00;
    font-size: 1.5rem;
}

.blog-card .post-date {
    display: block;
    margin-bottom: 10px;
    color: #888;
    font-size: 0.9em;
}

.blog-card .post-excerpt {
    flex-grow: 1;
    color: #ccc;
    margin-bottom: 15px;
    /* Limit lines for excerpt if needed, using line-clamp */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    align-self: flex-start;
    color: #FF9F33;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto;
}

.read-more:hover {
    text-decoration: underline;
}

/* Single Post Styles */
.blog-post-full {
    background: #1e1e1e;
    padding: 40px;
    border-radius: 8px;
    margin-top: 60px;
    /* Increased from 20px to clear sticky header */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.post-header-full {
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
    position: static;
    text-align: center;
}

.post-header-full h1 {
    color: #FF8C00;
    margin: 0 0 10px 0;
    font-size: 2.5rem;
}

.post-content-full {
    font-size: 1.1em;
    line-height: 1.8;
    color: #ddd;
}

.post-content-full img,
.project-full-content img,
.post-content-full iframe,
.project-full-content iframe,
.post-content-full video,
.project-full-content video {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px auto;
    /* Centers the media horizontally */
    display: block;
    /* Required for margin: auto to work on inline elements */
}

/* Maintain aspect ratio for YouTube/Vimeo embeds */
.post-content-full iframe,
.project-full-content iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #FF9F33;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

/* About Page Styles */
.about-section {
    padding: 40px 0;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    float: left;
    margin-right: 30px;
    margin-bottom: 20px;
    border: 3px solid #FF8C00;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
}

.bio::after {
    content: "";
    display: table;
    clear: both;
}

.bio h2 {
    color: #FF8C00;
    margin-top: 0;
    font-size: 2rem;
}

.bio p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.bio a,
.post-content-full a,
.project-full-content a {
    color: #FF9F33;
    text-decoration: none;
}

.bio a:hover,
.post-content-full a:hover,
.project-full-content a:hover {
    text-decoration: underline;
}

.skills {
    margin-top: 50px;
}

.skills h2 {
    color: #FF8C00;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.skill-category h3 {
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category ul li {
    margin-bottom: 8px;
    color: #ccc;
    position: relative;
    padding-left: 20px;
}

.skill-category ul li::before {
    content: "▹";
    color: #FF8C00;
    position: absolute;
    color: #FF8C00;
    position: absolute;
    left: 0;
}

/* Showreel Page Styles */
.showreel-section {
    padding: 40px 0;
    text-align: center;
}

.showreel-section h2 {
    color: #FF8C00;
    margin-bottom: 30px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    width: 100%;
    height: 100%;
}

/* Photography Authoring Styles */
.gallery-item {
    background: #1e1e1e;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #333;
}

.gallery-item h4 {
    margin: 0 0 5px 0;
    color: #FF8C00;
}

.secondary-btn {
    background: #444;
    font-size: 0.9em;
    padding: 8px 15px;
}

.secondary-btn:hover {
    background: #666;
}

.danger-btn {
    background: #cc0000;
    font-size: 0.9em;
    padding: 8px 15px;
}

.danger-btn:hover {
    background: #ff0000;
}

.photo-grid-authoring {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-item-authoring {
    background: #1e1e1e;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-item-authoring img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 3px;
}

.photo-item-authoring input[type="text"] {
    width: 100%;
    background: #333;
    border: 1px solid #444;
    color: #fff;
    padding: 5px;
}

/* Photography Display Styles */
.photography-section {
    padding: 40px 0;
    text-align: center;
}

.gallery-section {
    margin-bottom: 60px;
}

.gallery-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-header h3 {
    color: #FF8C00;
    margin: 0 0 5px 0;
}

.gallery-header p {
    color: #ccc;
    font-size: 0.9em;
    margin: 0;
}

.photo-grid-display {
    column-count: 3;
    column-gap: 15px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .photo-grid-display {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .photo-grid-display {
        column-count: 1;
    }
}

.photo-item-display {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
}

.photo-item-display img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.photo-item-display:hover img {
    transform: scale(1.05);
}

.photo-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item-display:hover .photo-caption-overlay {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    text-align: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    margin-top: 5%;
    border-radius: 4px;
    border: 2px solid #333;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #FF8C00;
    text-decoration: none;
    cursor: pointer;
}

/* Code Blocks inside Posts */
.post-content-full pre {
    background: #2d2d2d;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border-left: 4px solid #FF8C00;
    margin-bottom: 20px;
}

.post-content-full code {
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    background: #2d2d2d;
    padding: 2px 5px;
    border-radius: 3px;
    color: #e0e0e0;
}

.post-content-full pre code {
    background: transparent;
    padding: 0;
}